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 / abdur rab

struct node* reverse ( struct node* head )
{
struct node* temp;

if ( NULL == head -> next ) temp = head;
else {
temp = reverse ( head -> next );
head -> next -> next = head;
head -> next = NULL;
}
return ( temp );
}

Is This Answer Correct ?    0 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of null pointer in c?

957


Ow can I insert or delete a line (or record) in the middle of a file?

951


how could explain about job profile

1856


How can I get random integers in a certain range?

1014


What does node * mean?

1139


What is multidimensional arrays

1061


What is a good way to implement complex numbers in c?

991


What is call by value in c?

950


Can math operations be performed on a void pointer?

967


Can a program have two main functions?

1058


Is file a keyword in c?

884


please give me a VIRTUSA sample palcement papers.... you will only send TECHNICAL SECTION..... that is help for me Advance Thanks........................

1953


How can I write data files which can be read on other machines with different word size, byte order, or floating point formats?

973


Write a program to print fibonacci series without using recursion?

1064


What does the && operator do in a program code?

1155