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 is the right type to use for boolean values in c? Is there a standard type?

966


What is this pointer in c plus plus?

1025


What is class and object in c?

1046


how can use subset in c program and give more example

1927


How to write a code for reverse of string without using string functions?

2074


What are valid operations on pointers?

1149


What are the advantages of using macro in c language?

1066


What is n in c?

976


What is the purpose of sprintf?

1066


What is wild pointer in c?

1017


What are structure types in C?

1048


What is a shell structure examples?

1028


What is the sizeof () operator?

1016


How can I trap or ignore keyboard interrupts like control-c?

1019


What is array of pointers to string?

999