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

What are data types in c language?

1062


Explain what is the benefit of using an enum rather than a #define constant?

1227


what is stack , heap ,code segment,and data segment

2704


Can we declare variable anywhere in c?

981


What is a pointer in c plus plus?

1314


What is #include called?

1066


Why is c called c?

1032


How do you convert strings to numbers in C?

1231


Is that possible to add pointers to each other?

1377


What does *p++ do?

1029


How can I do graphics in c?

1038


What are two dimensional arrays alternatively called as?

1191


How can I discover how many arguments a function was actually called with?

1072


What is difference between stdio h and conio h?

1385


What is the maximum length of an identifier?

1188