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 |
How do you prevent buffer overflows in C?
How do you list files in a directory?
How do I use strcmp?
How to Throw some light on the splay trees?
What is far pointer in c?
change to postfix a/(b+c*d-e)
What is the use of header?
How do we swap or interchange any 2 numbers without using Temporary variable...Anybody can pls answer it.. Thanks in Advance
Write a program to print the prime numbers from 1 to 100?
Is main is a keyword in c?
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
What is the purpose of 'register' keyword?