how to do in place reversal of a linked list(singly or
doubly)?
Answer Posted / divakar & venkatesh
int reverse()
{
node *r,*s,*q;
s=NULL;
q=p;
while(q!=NULL)
{
r=q;
q=q->link;
r->link=s;
s=r;
}
p=r;
return;
}
this is reverse fun for single linked list.
Is This Answer Correct ? | 7 Yes | 4 No |
Post New Answer View All Answers
Describe dynamic data structure in c programming language?
What does malloc () calloc () realloc () free () do?
A text file that contains declarations used by a group of functions,programs,or users a) executable file b) header file c) obj file d) .cfile
What does int main () mean?
How is actual parameter different from the formal parameter?
What is a void pointer? When is a void pointer used?
Why array is used in c?
What is the scope of global variable in c?
What are the two types of functions in c?
How are variables declared in c?
what is the difference between 123 and 0123 in c?
Define Array of pointers.
Define recursion in c.
Is there a built-in function in C that can be used for sorting data?
How can a program be made to print the line number where an error occurs?