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

void reverse()
{
nptr p;
int i=0;
p=start;
while(p->next!=NULL)
{
p=p->next;
i=i+1;
}
i++;
while(i)
{
printf("%d\n",p->num);
p=p->prev;
i--;
}
}

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Multiply an Integer Number by 2 Without Using Multiplication Operator

819


Which of the following operators is incorrect and why? ( >=, <=, <>, ==)

1223


largest Of three Number using without if condition?

1665


Describe the order of precedence with regards to operators in C.

1100


What is the modulus operator?

1258


What are 3 types of structures?

1103


What does stand for?

1141


Discuss the function of conditional operator, size of operator and comma operator with examples.

1208


Do pointers take up memory?

1207


What is action and transformation in spark?

1226


How can I read a binary data file properly?

1246


What is const keyword in c?

1218


Explain what are compound statements?

1102


Tell me when is a void pointer used?

1239


How can I make sure that my program is the only one accessing a file?

1347