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

can i know the source code for reversing a linked list with
out using a temporary variable?

Answer Posted / zhangwy

void Func( struct Node* List )
{
if( List && List->Next )
{
Func( List->Next );

List->Next->Next = List;
List->next = NULL ;

}
}

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

The performance of an operation in several steps with each step using the output of the preceding step a) recursion b) search c) call by value d) call by reference

1178


How do you use a 'Local Block'?

1128


Explain how can I remove the trailing spaces from a string?

1004


What is dynamic dispatch in c++?

1010


what is the difference between class and unio?

2308


What is 1f in c?

2589


What is a 'null pointer assignment' error?

1175


What is the difference between array and structure in c?

1099


List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.

2702


Write a program to swap two numbers without using the third variable?

1026


What is the purpose of type declarations?

1084


Is it better to bitshift a value than to multiply by 2?

1059


What are the difference between a free-standing and a hosted environment?

1235


What is #ifdef ? What is its application?

1059


What does %c do in c?

944