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 the advantages of using Unions?

1225


What is the difference between local variable and global variable in c?

1223


Subtract Two Number Without Using Subtraction Operator

834


What are global variables?

1175


How can a process change an environment variable in its caller?

1175


What is ponter?

1262


When would you use a pointer to a function?

1036


What is the basic structure of c?

1075


What is malloc return c?

1015


What is union and structure in c?

1212


What is a 'null pointer assignment' error? Explain what are bus errors, memory faults, and core dumps?

1222


What is the function of volatile in c language?

1114


What do you mean by invalid pointer arithmetic?

1064


What is extern storage class in c?

990


What are preprocessor directives in c?

1085