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 |
Do you know what are the properties of union in c?
What is the output of below code? main() { static int a=5; printf("%3d",a--); if(a) main(); }
How to develop software using "c" programming?
What is memmove?
write a program that finds the factorial of a number using recursion?
Two's compliment of -5
Why structure is used in c?
Is c easy to learn?
what is the similarities between. system call and library function?
What Is The Difference Between Null And Void Pointer?
Can you subtract pointers from each other? Why would you?
Can we change the value of static variable in c?