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

Why do we need function?

1106


What's the "software peter principle”?

1201


Where are setjmp and longjmp used in c++?

1176


Explain the different access specifiers for the class member in c++.

1068


Explain how to initialize a const member data.

1082


How did c++ start?

1153


How would you implement a substr() function that extracts a sub string from a given string?

1107


What is ifstream c++?

1085


Distinguish between a # include and #define.

1210


Write a Program for dynamically intialize a 2 dimentional array. Eg:5x20, accept strings and check for vowels and display the no.finally free the space allocated .

1205


What is the difference between c++ and turbo c++?

1308


When do you call copy constructors?

1200


List the merits and demerits of declaring a nested class in C++?

1084


How would you find out if a linked-list is a cycle or not?

1059


Describe private, protected and public – the differences and give examples.

1271