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 many pointers are required to reverse a link list?

Answer Posted / vivek

using 2 pointer:
void reverse(node* head_in_out)
{
if(head_in_out)
{
node* aCurr = head_in_out;
node* aNext = NULL;
while (aCurr)
{
head_in_out = aCurr->next;
aCurr->next = aNext;
aNext = aCurr;
aCurr = head_in_out;
}
}

}

Is This Answer Correct ?    1 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the steps in the development cycle?

1098


What is virtual base class?

1077


Explain the use of this pointer?

1156


How do I get good at c++ programming?

1159


What is the use of turbo c++?

1048


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

996


What are the general quetions are in DEna bank manager IT/System interviews?

2020


Explain function overloading

1010


How a pointer differs from a reference?

1341


Is map thread safe c++?

1076


Explain Text Manipulation Routines?

1078


How does the copy constructor differ from the assignment operator (=)?

1141


Is c the same as c++?

1009


How does list r; differs from list r();?

1148


Draw a flow chart and write a program for the difference between the sum of elements with odd and even numbers. Two dimensional array.

6403