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 are c++ data types?

1120


What is iomanip c++?

1035


What is c strings syntax?

1094


What is a string example?

1035


Define linked lists with the help of an example.

998


Is c++ harder than java?

1022


When are exception objects created?

1039


What is anonymous object in c++?

1046


Why c++ is called oop?

1069


Can you please explain the difference between using macro and inline functions?

1018


What is helper in c++?

1053


What are the advantages of using a pointer?

1040


What is the sequence of destruction of local objects?

944


what is upcasting in C++?

1135


What is split a string in c++?

1150