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

What are the different file extensions involved when programming in C?

1252


which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above

2056


How can I find the modification date and time of a file?

1081


What is the difference between char array and char pointer?

1049


Design a program which assigns values to the array temperature. The program should then display the array with appropriate column and row headings.

2321


Explain how do you search data in a data file using random access method?

1132


Write a program to produce the following output: 1 2 3 4 5 6 7 8 9 10

15805


How are variables declared in c?

1092


how can use subset in c program and give more example

1990


What is #define in c?

1044


Why is c fast?

1055


Explain the ternary tree?

1021


What are structures and unions? State differencves between them.

1171


Which is better malloc or calloc?

1097


Write a program to show the change in position of a cursor using c

1055