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
any limit on the number of functions that might be present in a C program a) max 35 functions b) max 50 functions c) no limit d) none of the above
How do shell structures work?
What is a substring in c?
What is identifier in c?
Can include files be nested? How many levels deep can include files be nested?
Can we declare variable anywhere in c?
State the difference between realloc and free.
a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above
What is indirection?
how many key words availabel in c a) 28 b) 31 c) 32
How do you convert strings to numbers in C?
What is use of null pointer in c?
develop algorithms to add polynomials (i) in one variable
What are volatile variables in c?
When should you use a type cast?