In this code the x isint...Please modify theconditionif x will bechar ..
for(p=*head; p!=NULL &&x>p->info; p=p->next)
we should change only this:x>p->info
( maybe we need to use the ASCII code?)
Extracted text: Operation place insert an element x into sorted linear linked list structure. Where head points to a sorted list and x is an element to be inserted into its proper position within the list. void place(NODEPTR *head , int x) { NODEPTR p, q; q= NULL; for(p=*head; p!=NULL && x>p->info; p=p->next) q= p; if (q == NULL) /* insert x at the head of the list */ {p=getnode() p->info=x; p->next = head; head=p; } Else{ p=getnode(); p->info=x; p->next=q->next; q->next=p; } }
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here