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 are the applications of c language?

1121


What are the different types of data structures in c?

1213


What is use of pointer?

1161


what are the advantages of a macro over a function?

1191


Is there a way to compare two structure variables?

1169


What would be an example of a structure analogous to structure c?

1044


write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?

2178


How can I generate floating-point random numbers?

1199


What is C language ?

2016


What do you mean by keywords in c?

1196


Write a code to remove duplicates in a string.

1081


Are the expressions * ptr ++ and ++ * ptr same?

1201


What is array in c with example?

1353


Can variables be declared anywhere in c?

1147


What is a program flowchart and explain how does it help in writing a program?

1357