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...

Write a program to reverse a linked list?

Answer Posted / surendra

suppose p is the head pointer.


r=NULL;
while(p)
{
q=r;
r=p;
p=p->next;
r->next=q;
}
p=r;

Is This Answer Correct ?    16 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between a pointer and a link in c ++?

1046


What do you know about near, far and huge pointer?

1136


Which bit wise operator is suitable for putting on a particular bit in a number?

1200


Is dev c++ free?

1040


Why use of template is better than a base class?

1177


What is a memory leak c++?

1133


How static variables and local variablesare similar and dissimilar?

1039


Why do we use templates?

1043


What are vtable and vptr?

1140


Can I learn c++ without learning c?

1002


What is null pointer and void pointer and what is their use?

1096


Is c++ the most powerful language?

1076


Which command properly allocates memory a) char *a=new char[20]; b) char a=new char[20]; c) char a=new char(20.0);

1053


Explain overriding.

982


What is runtime polymorphism in c++?

1155