(Code-Tracing) What will happen if a class does not define a constructor?
16Multiple Choice
(Conceptual) What does the super (or base) keyword do inside a child class
constructor?
17Multiple Choice
(Scenario-Based) You have a list of Employee objects. Some are Managers, some
are Developers. You want to calculate the total salary by calling emp.getSalary() on
every item in the list. This is possible because of:
18Multiple Choice
(Comparison) What is the difference between Aggregation and Composition?
19Multiple Choice
(Debugging) What is a Memory Leak in an OOP language like C++?
20Multiple Choice
(Conceptual) What is a Virtual Method Table (V-Table) used for?
21Multiple Choice
(Code-Tracing) If a class A has a protected member x, who can access it?
22Multiple Choice
(Conceptual) What is the Single Responsibility Principle (the S in SOLID)?
23Multiple Choice
(Scenario-Based) You want to prevent a method in a parent class from being
overridden by any child class. What keyword should you use?
24Multiple Choice
(Conceptual) What is a Copy Constructor?
25Multiple Choice
(Code-Tracing) In a language like Python, what is the purpose of the self (or this
in Java) keyword?
1Multiple Choice
(Conceptual) In the standard memory layout of a C/C++ program, which segment
grows downward (towards lower addresses) during function calls?
2Multiple Choice
(Scenario-Based) A Java application is running, and the RAM usage is steadily
increasing. Suddenly, the usage drops by 500MB without any user action. What most likely
occurred?
3Multiple Choice
(Code-Tracing / C++) What is the danger in the following code snippet?
int* ptr = new int(10);
ptr = new int(20);
4Multiple Choice
(Comparison) What is the primary functional difference between malloc() in C and
new in C++?
5Multiple Choice
(Conceptual) Which Garbage Collection algorithm works by keeping a count of how
many pointers refer to an object, and deleting the object when the count reaches zero?
6Multiple Choice
(Debugging) What typically causes a Segmentation Fault (SIGSEGV)?
7Multiple Choice
(Conceptual) In modern Garbage Collectors, what is the "Generational Hypothesis"?
8Multiple Choice
(Scenario-Based) A C++ developer uses std::unique_ptr instead of raw pointers.
This is an application of which memory management philosophy?
9Multiple Choice
(Calculation) If a 32-bit system has a maximum of 4GB of addressable memory, how
many bits are used for each memory address?
10Multiple Choice
(Conceptual) What is Memory Fragmentation?
1Multiple Choice
(Conceptual) In the Java/C# exception hierarchy, which type of exception usually
represents a programmer's logic error and does not need to be explicitly declared in the
method signature?
2Multiple Choice
(Code-Tracing) What is the output of the following pseudocode? • • • function check():
try:
print("A")
return 1
catch:
print("B")
finally:
print("C")
3Multiple Choice
(Scenario-Based) A developer writes a catch (Exception e) { } block with no
code inside. Why is this considered "Dangerous" in professional software development?
4Multiple Choice
(Comparison) What is the primary difference between throw and throws?
5Multiple Choice
(Debugging) Look at this C++ catch sequence. Why is it problematic?
try { ... }
catch (std::exception& e) { ... }
catch (std::runtime_error& e) { ... }
6Multiple Choice
(Conceptual) What happens if an exception is thrown inside a function, but there is no
try-catch block to handle it in that function?
7Multiple Choice
(Scenario-Based) You are writing a banking app. A user tries to withdraw $100 but only
has $50. Which is the most appropriate way to handle this?
8Multiple Choice
(Code-Tracing) Trace the result of this Java-style math logic:
try:
int x = 10 / 0
catch (ArithmeticException e):
x = 0
print(x)
9Multiple Choice
(Conceptual) Which of the following is true regarding Errors (like
java.lang.Error)?
10Multiple Choice
(Scenario-Based) A developer needs to ensure a Database connection is closed even
if an SQL error occurs. Which block is dedicated to this "cleanup" logic?
11Multiple Choice
(Conceptual) Why is it generally considered bad practice to use Exceptions for
standard "Control Flow" (e.g., using an exception to break out of a loop)?
12Multiple Choice
(Code-Tracing) In a language like Python, what is the equivalent of the catch block?
13Multiple Choice
(Scenario-Based) You are using a try-with-resources block (Java) to read a file.
When does the file.close() method get called?
14Multiple Choice
(Conceptual) What is a "Nested" try-catch block?
15Multiple Choice
(Debugging) A program crashes with a "Stack Overflow Error." This is most likely
caused by:
1Multiple Choice
(Conceptual) What is the primary purpose of a Namespace in languages like C++, C#,
or PHP? • • • •
2Multiple Choice
(Comparison) What is a major disadvantage of using a Static Library compared to a
Dynamic Library?
3Multiple Choice
(Scenario-Based) A developer is using npm for a JavaScript project and pip for a
Python project. These tools are best classified as:
4Multiple Choice
(Conceptual) In software architecture, "Inversion of Control" (Io
5Multiple Choice
(Debugging) You are trying to compile a project, but the compiler says "Module not
found" or "Include file missing," even though the code is perfect. What is the most likely
cause?
6Multiple Choice
(Code-Tracing) Look at this Java import: import java.util.*;. What does the *
signify?
7Multiple Choice
(Conceptual) What is a Circular Dependency?
8Multiple Choice
(Comparison) In C/C++, what is the role of a Header File (.h) compared to a Source
File (.cpp)?
9Multiple Choice
(Scenario-Based) You want to share your code so that other developers can use it, but
you don't want them to see your actual source code. How should you distribute your logic?
10Multiple Choice
(Conceptual) Which of the following is an example of Semantic Versioning
(SemVer)?
1Multiple Choice
(Conceptual) What is the primary advantage of using Generics over using the Object
class to store items in a collection?
2Multiple Choice
(Code-Tracing / Java) In Java, what is the result of Type Erasure on a
List<Integer> after the code is compiled into bytecode?