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 / vishnu948923

struct node* reverse(struct node* first)
{
struct node* cur, temp;
cur=NULL;
while(first!=NULL)
{
temp=first;
first=first->link;
temp->link=cur;
cur=temp;
}
return cur;
}

Is This Answer Correct ?    5 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

write a c program to calculate sum of digits till it reduces to a single digit using recursion

3377


What are c header files?

1034


An arrangement of information in memory in such a way that it can be easily accessed and processed by a programming language a) string b) data structure c) pointers d) array

1191


Explain what are the different file extensions involved when programming in c?

1155


How can I copy just a portion of a string?

1362


What is pre-emptive data structure and explain it with example?

3786


What is time null in c?

1107


How old is c programming language?

1061


What is hungarian notation? Is it worthwhile?

1271


When should you use a type cast?

1178


Differentiate between declaring a variable and defining a variable?

1087


a program that performs some preliminary processing in C, it acts upon certain directives that will affect how the compiler does its work a) compiler b) loader c) directive d) preprocessor

1139


What is the purpose of macro in C language?

1162


What is the time and space complexities of merge sort and when is it preferred over quick sort?

1129


which is an algorithm for sorting in a growing Lexicographic order

1861