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
Can we compile a program without main() function?
What are reserved words?
Explain high-order bytes.
Why c is called top down?
What does main () mean in c?
what are the different storage classes in c?
find out largest elemant of diagonalmatrix
Explain about block scope in c?
is it possible to create your own header files?
What does void main return?
Is swift based on c?
What is file in c language?
Synonymous with pointer array a) character array b) ragged array c) multiple array d) none
write a c program to find the sum of five entered numbers using an array named number
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f