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

make a middle node of doubly linklist to the top of the list

Answer Posted / hussein

middle->prev->next = middle->next;
middle->next->prev = middle->prev;

// Now make the middle as head.
middle->prev = NULL;
middle->next = head;
head->prev = middle;
head = middle;

Is This Answer Correct ?    2 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to implement is-a and has-a class relationships?

1010


What sorting algorithm does c++ use?

1132


How to access a variable of the structure?

1068


What is a map in c++?

1185


In a function declaration what does extern means?

1039


What is main function in c++ with example?

1208


Difference between overloading vs. Overriding

1068


Is c++ the most powerful language?

1067


Explain abstraction.

1097


Why are pointers not used in c++?

1124


What are libraries in c++?

1053


What is :: operator in c++?

1037


What is null pointer and void pointer and what is their use?

1085


Explain how functions are classified in C++ ?

1213


What is lambda in c++?

1195