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

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

978


How do shell structures work?

1060


What is a substring in c?

992


What is identifier in c?

960


Can include files be nested? How many levels deep can include files be nested?

1082


Can we declare variable anywhere in c?

917


State the difference between realloc and free.

1029


a function gets called when the function name is followed by a a) semicolon (;) b) period(.) c) ! d) none of the above

1322


What is indirection?

1022


how many key words availabel in c a) 28 b) 31 c) 32

1006


How do you convert strings to numbers in C?

1165


What is use of null pointer in c?

954


develop algorithms to add polynomials (i) in one variable

2106


What are volatile variables in c?

881


When should you use a type cast?

1050