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...


How would you sort a linked list?



How would you sort a linked list?..

Answer / prakashdasari

node *ptr1,*ptr2,*ptr3;
ptr1=start;
ptr2=ptr1->next;
ptr3=ptr2->next;
ptr1->next=NULL;
ptr2->next=ptr1;
while(ptr3!=NULL)
{
ptr1=ptr2;
ptr2=ptr3;
ptr3=ptr3->next;
ptr2->next=ptr1;
}
start = ptr2;

Is This Answer Correct ?    1 Yes 2 No

Post New Answer

More C Interview Questions

How do you prevent buffer overflows in C?

2 Answers  


How do you list files in a directory?

0 Answers  


How do I use strcmp?

0 Answers  


How to Throw some light on the splay trees?

0 Answers  


What is far pointer in c?

0 Answers  


change to postfix a/(b+c*d-e)

8 Answers   Value Labs,


What is the use of header?

0 Answers  


How do we swap or interchange any 2 numbers without using Temporary variable...Anybody can pls answer it.. Thanks in Advance

8 Answers  


Write a program to print the prime numbers from 1 to 100?

7 Answers  


Is main is a keyword in c?

0 Answers  


i want to asked a question about c program the question is: create a c program that displays all prime numbers less than 500? using looping statement

5 Answers  


What is the purpose of 'register' keyword?

0 Answers  


Categories