-
The destroyList() member function deletes the contents of the linked list and ________________.
Skill/Topic: Linked ListA) does not delete the linked list itselfB) delete the linked list itselfC) adds the linked list itselfD) None of the aboveExplanation: The destructor is a member function called when the instance of the LinkedList class is deleted using the delete operator. In the example shown next, the destructor contains one statement that calls the destroyList() member function.The destroyList()...
-
The destructor is responsible for allocating all the memory that was allocated for the linked list.
Skill/Topic: Linked ListA) TrueB) FalseExplanation: The destructor is responsible for de-allocating all the memory that was allocated for the linked list.
-
Linked list C++ application is organized into three files.They are _____, ______ and _____.
Skill/Topic: Linked ListA) header file , source code file , application fileExplanation: The first file is the header file that contains the definition of the NODE structure and the LinkedList class definition. The second file is a source code file containing the implementation of member functions of the LinkedList class. The last file is the application file that contains code that creates and uses...
-
A stack-linked list is a data structure that uses a ______ to create a stack.
Skill/Topic: Stacks using Linked ListA) Linked ListB) QueueC) Doubly linked list
-
LinkedList.h file is the header file that contains the definition of the Node structure and the definition of the LinkedList class.
Skill/Topic: Stacks using Linked ListA) TrueB) False
-
The size of a queue linked list can change during runtime?
Skill/Topic: Queues Using Linked ListsA) TrueB) False
-
The size of an array queue can change during runtime?
Skill/Topic: Queues Using Linked ListsA) TrueB) FalseExplanation: The size of an array queue is set at compile time and cannot change at runtime
-
New nodes are added to the _____ of the queue.
Skill/Topic: Queues Using Linked ListsA) frontB) backC) middleExplanation: New nodes are added to the back of the queue.
-
Parent Node is also called as _____ Node.
Skill/Topic: TreeA) MainB) RootC) BranchD) Stem
-
Data Structures Link Conversion
How do you convert doubly linked list to single without using structures?
-
Boolean Expression
The boolean expression X + XY equals 1. X + Y2. Y + YX3. XY + YX4. None of these
-
Why would you use a structure?
Skill/Topic: Variables and PointersA) You use a structure to access parts of a dataB) You use a structure to group together related data.C) You use a structure to declare an instance of data groupExplanation: Structure is used to group all related data together
-
The symbol * is also called as _________________.
Skill/Topic: Variables and PointersA) pointer dereferencing operatorExplanation: (sometimes called as dereferencing operator)
-
Elements of an array are stored _______ in memory.
Skill/Topic: ArrayA) PeriodicalB) SequentiallyC) ParallelyD) None of the aboveExplanation: Elements of an array are stored sequentially in memory. For example,First, create an array called letters and assign characters to it, as shown here: char letters[3];letters[0] = 'C';letters[1] = 'B';letters[2] = 'A';In this, each letter appears one after the other in memory. This is because these values are...
-
The dequeue process removes data from the front of the queue.
Skill/Topic: QueueA) TrueB) False
-
Link list does not have any advantage when compared to an Array.
Skill/Topic: Linked ListA) TrueB) FalseExplanation: A linked list can grow and shrink in size dynamically at runtime, whereas an array is set to a fixed size at compile time.
-
The benefit of using a stack-linked list is that the number of nodes on the stack can increase or decrease as needed while the program runs.
Skill/Topic: Stacks using Linked ListA) TrueB) False
-
Why does the StackLinkedList class inherit the LinkedList class?
Skill/Topic: Stacks using Linked ListA) StackLinkedList class uses different attributes and member functions of the LinkedList class.B) StackLinkedList class uses same attributes and member functions of the LinkedList class.
-
Conceptually, a linked list queue is the same as a queue built using an array.
Skill/Topic: Queues Using Linked ListsA) TrueB) FalseExplanation: Conceptually, a linked list queue is the same as a queue built using an array. Both store data. Both place data at the front of the queue and remove data from the front of the queue
-
The insertNodeAt() function can place a node at the front or back of a linked list if you pass the appropriate index to this function.
Skill/Topic: Stacks and Queues: Insert, Delete, Peek, FindA) TrueB) False
Data Structures Interview Questions
Ans