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

State the difference between pre and post increment/decrement operations.

1092


What is a constructor in c++ with example?

1138


Explain the different access specifiers for the class member in c++.

1015


What is the difference between delegation and implemented-in-terms-of?

1013


What are the benefits of oop in c++?

1235


What is the v-ptr?

1169


How can virtual functions in c++ be implemented?

1139


What is atoi?

979


What is the use of data hiding?

1019


Explain differences between alloc() and free()?

1145


Can a Structure contain a Pointer to itself?

1148


What are the 2 main types of data structures?

1128


State two differences between C and C++.

1181


Why do we need runtime polymorphism in c++?

1034


What happens when the extern "c" char func (char*,waste) executes?

1089