A variable that contains a memory address
What is a pointer?
A standard singly linked list node consists of these two specific components.
What are a data member and a "next" pointer?
This four-letter acronym describes the operational order of a stack, meaning the most recently added item is the first to be removed.
What is LIFO (Last-In-First-Out)?
This is defined as a sequence of steps for solving a problem.
What is an algorithm?
This is the specific return type required for a class constructor.
What is none?
This is the region in program memory where the new operator allocates memory.
What is The Heap?
This is the specific reason linked lists are considered "dynamic" compared to the "static" nature of a standard array.
What is the ability to grow or shrink in size during runtime?
In a queue data structure, this is the specific end where a new element is added during an "enqueue" operation.
What is the back (or rear)?
This search algorithm starts from the beginning and compares every element until the key is found.
What is a linear search?
To access a member function or data member through a pointer, this specific operator is used.
What is the Arrow Operator? (e.g., ptr->Display())
This operator is used to access the variable to which a pointer points.
The dereference operator *
In a linked list that contains zero nodes, this is the value stored in the head pointer.
What is a nullptr?
Starting with a stack containing Tom and Sam (where Tom is at the top), this is the result of the sequence: Push(Hal), Pop(), Pop(), Peek().
What is Sam?
Every recursive function must eventually reach this specific condition to stop calling itself and prevent a "stack overflow" error.
What is a base case?
This implicit keyword serves as a pointer to the calling object itself, often used to resolve naming conflicts between parameters and data members.
What is "this"?
This occurs when a program allocates memory but loses the ability to access or free it.
What is a Memory Leak?
This is the Big-O time complexity required to access the nth element in a singly linked list.
What is O(n)?
Given a queue with the values 12, 24, 48 (where 12 is at the front), these are the contents of the queue after an Enqueue(72) followed by a Dequeue().
What are 24, 48, and 72?
In the worst-case scenario, this is the Big-O time complexity of a Linear Search if the target element is at the very end of the list or not present at all.
What is O(n)?
Adding this keyword to the end of a member function declaration guarantees the function will not modify the object's state.
What is const? (e.g., void Print() const;)
Which statement properly frees a dynamically allocated array Musketeer* musketeers = new Musketeer[8];
delete [] musketeers;
To remove a node from the middle of a list without causing a memory leak or "breaking" the list, you must perform these two conceptual steps.
What is updating the previous node’s pointer and deleting the target node?
Identify which structure (Stack or Queue) is used to handle documents sent to a shared office printer.
What is a queue?
Trace the following recursive function for PrintNum(13) (what is the result):
void PrintNum(int n) {
if (n == 0) return;
cout << n % 2;
PrintNum(n / 2); }
What is 1011 ?
In professional C++ development, these specific preprocessor directives (beginning with #ifndef) are used in header files to prevent the class from being defined more than once during compilation.
What are Header Guards?