Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can we compile a program without main() function?

1121


What are reserved words?

1110


Explain high-order bytes.

1118


Why c is called top down?

1157


What does main () mean in c?

1095


what are the different storage classes in c?

1178


find out largest elemant of diagonalmatrix

2248


Explain about block scope in c?

1093


is it possible to create your own header files?

1106


What does void main return?

1120


Is swift based on c?

1105


What is file in c language?

1004


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1065


write a c program to find the sum of five entered numbers using an array named number

2139


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

2156