-
A pointer to a pointer is a variable whose value is an ________ of another _______ variable.
Skill/Topic: Variables and PointersA) Address, PointerExplanation: A pointer to a pointer is a variable whose value is an address of another pointer variable
-
Pointer to a pointer is used in a program to ?
Skill/Topic: Variables and PointersA) arrange data by moving data in memoryB) arrange data by moving pointer in memoryC) arrange data without having to move data in memory.D) None of the aboveExplanation: Pointer to a pointer is used in a program to arrange data without having to move data in memory.
-
An array is a way to reference a series of memory locations using the ______.
Skill/Topic: ArrayA) Same nameB) different nameC) Multiple namesD) Unique nameExplanation: An array is a way to reference a series of memory locations using the same name. Each memory location is represented by an array element. An array element is similar to one variable except it is identified by an index value instead of a name.
-
Why do we Use a Multidimensional Array?
Skill/Topic: ArrayA) A multidimensional array can be useful to organize subgroups of data within an array. In addition to organizing data stored in elements of an array, a multidimensional array can store memory addresses of data in a pointer array and an array of pointers
-
Allocating memory at runtime is also called as?
Skill/Topic: ArrayA) Statically allocating memoryB) Dynamically allocating memoryC) Sequentially allocating memoryD) All of the aboveExplanation: Allocating memory at runtime is called a dynamically allocating memory. In this,you dynamically allocate memory by using the new operator when declaring the array, for example:int grades[] = new int[10];
-
_________ method places a value onto the top of a stack.
Skill/Topic: Stacks using an ArrayA) push() member methodB) pop() member methodC) isFull() member methodD) isEmpty() member methodExplanation: Push is the direction that data is being added to the stack. push() member method places a value onto the top of a stack.
-
Popping removes an item from the stack.
Skill/Topic: Stacks using an ArrayA) TrueB) FalseExplanation: Popping is the reverse process of pushing: it removes an item from the stack. It is important to understand that popping an item off the stack doesn’t copy the item. Once an item is popped from the stack, the item is no longer available on the stack, although the value remains in the array
-
What is a queue ?
Skill/Topic: QueueA) A Queue is a sequential organization of data.
-
What is the relationship between a queue and its underlying array?
Skill/Topic: QueueA) Data stored in a queue is actually stored in an array. The queue tracks which array element is at the front of the queue and which array element is at the back of the queue.
-
The isFull() member method is called within the enqueue process to determine ?
Skill/Topic: QueueA) if there is room to place another item in the queue.B) if there is an item in the queue to be removedC) if there is an item in the queue to be locked
-
Each entry in a linked list is called a _______.
Skill/Topic: Linked ListA) LinkB) NodeC) Data structureExplanation: Each entry in a linked list is called a node. Think of a node as an entry that has three subentries. One subentry contains the data, which may be one attribute or many attributes. Another points to the previous node, and the last points to the next node. When you enter a new item on a linked list, you allocate the new node and then...
-
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 Interview Questions
Ans