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

create an singly linked lists and reverse the lists by
interchanging the links and not the data?

Answer Posted / sanjay rajput

struct node
{
int val;
struct node *next;
};

typedef struct node NODE;
NODE *p,*start;
p=start->next;
while(p!=NULL)
{
p->next=start;
start=p;
p=p->next;
}

Is This Answer Correct ?    1 Yes 10 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you declare An array of three pointers to chars

917


Name few concurrent collection classes?

961


What type of memory allocation is referred for Linked lists?

1237


Is data structures and algorithms important?

986


Which language is best for data structures?

1001


What is a undirected graph?

1008


What is the difference between b tree and binary search tree?

919


What is data structure and its operations?

892


What are the average and worst time complexity in a sorted binary tree is

1008


Does treemap allow null values?

911


Explain in brief a linked list.

1008


How can we reverse a singly linked list?

1091


Can we insert null in hashset?

1146


Why is data structure?

918


What is an externalizable interface?

1037