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


write a C code To reverse a linked list

Answers were Sorted based on User's Feedback



write a C code To reverse a linked list..

Answer / sujith

include <stdio.h>

typedef struct list {
list_t *next;
int data;

}list_t;
list_t *list_reverse(list_t *list)
{
list_t *rlist = NULL;
while (list != NULL)
{
list_t *next = list->next;
list->next = rlist;
rlist = list;
list = next;
}
return rlist;
}
This will do the job.
Plese do verify this.
Sujith

Is This Answer Correct ?    27 Yes 12 No

write a C code To reverse a linked list..

Answer / haymo

sir u can reverse a linklist

Is This Answer Correct ?    16 Yes 2 No

Post New Answer

More C Interview Questions

How many main () function we can have in a project?

0 Answers  


Explain the difference between getch() and getche() in c?

0 Answers  


What is the condition that is applied with ?: Operator?

0 Answers  


void swap(int a,int b) { a=a+b; b=a-b; a=a-b; } in this code always gives the same result for all case

9 Answers   Accenture, TCS,


What is an lvalue?

0 Answers  


What is the difference between exit() and _exit() function in c?

0 Answers  


How do you list files in a directory?

0 Answers  


What does *p++ do? What does it point to?

0 Answers  


What is the difference between memcpy and memmove?

0 Answers  


for(;;) printf("C language") What is out put of above??

2 Answers   Practical Viva Questions,


What does 3 periods mean in texting?

0 Answers  


how much salary u want ? why u join in our company? your domain is core sector why u prefer software ?

0 Answers   Gopaljee, TCS,


Categories