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?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

What does the function toupper() do?

1104


Why static variable is used in c?

1020


Write the Program to reverse a string using pointers.

1003


What is the size of structure pointer in c?

1053


Can you pass an entire structure to functions?

1108


How old is c programming language?

997


C program to find all possible outcomes of a dice?

2331


Can we change the value of constant variable in c?

1037


What is a rvalue?

1187


What is structure in c language?

1149


What are keywords c?

1018


What is the difference between a function and a method in c?

1069


write a c program to find the sum of five entered numbers using an array named number

2120


the statement while(i) puts the entire logic in loop. this loop is called a) indefinite loop b) definite loop c) loop syntax wrong d) none of the above

1035


Why does the call char scanf work?

1184