DATA STRUCTURES AND ALGORITHMS IN
CPLUSPLUS CERTIFICATION EVALUATION
EXAMS SET FULL QUESTIONS AND
COMPLETE SOLUTION
●● What is a pointer?
Answer: A pointer is a variable that stores the memory address of
another variable.
●● What is a memory leak?
Answer: A memory leak occurs when memory is allocated on the heap
but not released, resulting in lost memory until the program terminates.
●● What is a dangling pointer?
Answer: A dangling pointer points to a memory location that has been
deallocated, leading to undefined behavior if accessed.
●● What is a reference variable?
Answer: A reference variable is an alias for an existing variable,
allowing changes to affect the original variable.
●● What is the compilation process?
, Answer: The compilation process includes preprocessing, compilation,
assembly, and linking to produce an executable.
●● What is debugging?
Answer: Debugging is the process of identifying and resolving errors in
code.
●● What is unit testing?
Answer: Unit testing verifies individual functions or components, often
using a test bench for inputs and outputs.
●● What is a self-referential structure?
Answer: A self-referential structure includes a pointer to another
instance of the same structure, used in linked lists and trees.
●● What is Quick Sort?
Answer: Quick Sort is a divide-and-conquer algorithm with an average
time complexity of O(n log n) and space complexity of O(log n).
●● What is Selection Sort?
Answer: Selection Sort repeatedly finds the minimum element and
swaps it into place, with a time complexity of O(n^2).
●● What is hashing?
CPLUSPLUS CERTIFICATION EVALUATION
EXAMS SET FULL QUESTIONS AND
COMPLETE SOLUTION
●● What is a pointer?
Answer: A pointer is a variable that stores the memory address of
another variable.
●● What is a memory leak?
Answer: A memory leak occurs when memory is allocated on the heap
but not released, resulting in lost memory until the program terminates.
●● What is a dangling pointer?
Answer: A dangling pointer points to a memory location that has been
deallocated, leading to undefined behavior if accessed.
●● What is a reference variable?
Answer: A reference variable is an alias for an existing variable,
allowing changes to affect the original variable.
●● What is the compilation process?
, Answer: The compilation process includes preprocessing, compilation,
assembly, and linking to produce an executable.
●● What is debugging?
Answer: Debugging is the process of identifying and resolving errors in
code.
●● What is unit testing?
Answer: Unit testing verifies individual functions or components, often
using a test bench for inputs and outputs.
●● What is a self-referential structure?
Answer: A self-referential structure includes a pointer to another
instance of the same structure, used in linked lists and trees.
●● What is Quick Sort?
Answer: Quick Sort is a divide-and-conquer algorithm with an average
time complexity of O(n log n) and space complexity of O(log n).
●● What is Selection Sort?
Answer: Selection Sort repeatedly finds the minimum element and
swaps it into place, with a time complexity of O(n^2).
●● What is hashing?