make a middle node of doubly linklist to the top of the list
Answer / 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 |
What are the advantages of using typedef in a program?
Write a program to swap 2 chars without using a third varable? char *s = "A"; char *p = "B";
Keyword mean in declaration?
Write a note about the virtual member function?
What are Binay tress and B trees? Diff between them?
Can member functions be private?
class base { public: int fun(int) {} }; class base2 { public: int fun(float) { } }; so here qustion is both function either function overloading or over riding;
Can constructor be private in c++?
What is the difference between object-oriented programming and procedural programming?
What are shallow and deep copies?
Why the usage of pointers in C++ is not recommended ?
Do class declarations end with a semicolon? Do class method definitions?