Debugging, Testing & Optimization MCQs

Topic-wise practice questions for Programming (C++ / Java / Python). Test your knowledge, check solutions on demand, and pace your preparation.

Zero-leak answer engine • Rate-limited explanations
Practice in Timed Mode
Q1easy
A developer uses a "Mock Object" during a Unit Test. Why?
Q2hard
What does Cyclomatic Complexity measure in a piece of code?
Q3easy
A linter flags a "Dead Code" warning. What does this mean?
Q4easy
What is Fuzz Testing (Fuzzing)?
Q5easy
You see a "Core Dump" file after a C++ program crashes. What does this file contain?
Q6easy
What is the difference between Alpha Testing and Beta Testing?
Q7medium
Which optimization technique involves replacing a function call with the actual body of the function during compilation?
Q8easy
What is the primary difference between a Breakpoint and a Watchpoint during debugging?
Q9medium
In the "Red-Green-Refactor" cycle of Test-Driven Development (TDD), what does the "Red" stage represent?
Q10hard
You are optimizing a function that calculates prime numbers. You decide to store previously calculated results in a Hash Map to avoid recalculating them. This optimization is known as: