Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.
Debugging, Testing & OptimizationEasy
Q1. What is debugging?
- A.Compiling code into machine language
- B.Writing new source code from scratch
- C.Finding and fixing errors in a program✓ Correct
- D.Running automated tests on the code
Explanation
Debugging is the systematic process of identifying, analyzing, and removing errors from software.
Report an error in this question
Debugging, Testing & OptimizationEasy
Q2. What is a test case?
- A.A debug tool for stepping through code line by line
- B.A set of inputs and expected results for verification✓ Correct
- C.A code review process performed by team members
- D.A programming language for writing test scripts
Explanation
A test case defines inputs, actions, and expected outcomes to verify specific behavior.
Report an error in this question
Debugging, Testing & OptimizationEasy
Q3. What is print/console debugging?
- A.Using print statements to display values and flow✓ Correct
- B.An automated process for finding and fixing bugs
- C.A graphical user interface tool for visual debugging
- D.Professional debugging using specialized IDE tools
Explanation
Print debugging uses output statements to trace variable values and execution flow.
Report an error in this question
Debugging, Testing & OptimizationEasy
Q4. What is a breakpoint?
- A.An error in the source code of the program
- B.A marker where the debugger pauses for inspection✓ Correct
- C.An exit point from a loop during execution flow
- D.The end of a function where control is returned
Explanation
A breakpoint is a point where the debugger pauses execution for variable inspection.
Report an error in this question
Debugging, Testing & OptimizationEasy
Q5. What is a unit test?
- A.A user acceptance test for final validation
- B.Testing the entire application end to end
- C.A test verifying a single isolated code unit✓ Correct
- D.A performance test measuring execution speed
Explanation
A unit test tests an individual function or method in isolation.
Report an error in this question
Debugging, Testing & OptimizationEasy
Q6. What is a bug?
- A.A type of variable storing debug data
- B.A feature that works as intended
- C.A function used for error handling
- D.An error or flaw causing wrong behavior✓ Correct
Explanation
A bug is a defect that causes incorrect or unexpected results.
Report an error in this question
Debugging, Testing & OptimizationEasy
Q7. What does the term 'step over' mean in debugging?
- A.Execute current line and move to next without entering calls✓ Correct
- B.Skip the entire program execution completely
- C.Jump directly to the end of the current function body
- D.Restart the debugging session from the very beginning
Explanation
Step over executes the current line completely and stops at the next line in the current function.
Report an error in this question
Debugging, Testing & OptimizationEasy
Q8. What is a logic error?
- A.An error where program runs but produces incorrect results✓ Correct
- B.A syntax mistake caught during code compilation by compiler
- C.A type error from assigning incompatible values to variables
- D.A compile error that prevents the program from being built
Explanation
A logic error produces wrong results because the algorithm or logic is incorrect.
Report an error in this question
Debugging, Testing & OptimizationEasy
Q9. What is a syntax error?
- A.A logic mistake producing incorrect program results
- B.A runtime error that occurs during program execution
- C.A design flaw in the overall application architecture
- D.A violation of language grammar rules at compile time✓ Correct
Explanation
A syntax error occurs when code doesn't conform to the language's grammar rules.
Report an error in this question
Debugging, Testing & OptimizationEasy
Q10. What is the purpose of an assertion?
- A.To create a new variable in the current scope of code
- B.To import a module from an external library into the file
- C.To define a new function with parameters and return type
- D.To verify a condition is true and fail with message if not✓ Correct
Explanation
An assertion checks a condition and throws an error if false, validating assumptions.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q11. What is code coverage?
- A.How much source code has been written in total
- B.The percentage of code lines executed during testing✓ Correct
- C.A code review tool for examining code quality metrics
- D.A security measure for protecting source code files
Explanation
Code coverage measures what percentage of source code is exercised by the test suite.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q12. What is Test-Driven Development (TDD)?
- A.A deployment strategy for releasing code to production
- B.Testing code only after all development is complete
- C.Writing tests before code to drive the design process✓ Correct
- D.A debugging technique for finding runtime exceptions
Explanation
TDD follows: write a failing test, write minimal code to pass it, then refactor.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q13. What is the difference between black-box and white-box testing?
- A.There is no meaningful difference between the two testing approaches
- B.Black-box tests functionality without code; white-box tests internals✓ Correct
- C.White-box testing is fully automated while black-box is manual
- D.Black-box testing is always better than white-box in every case
Explanation
Black-box validates behavior based on specifications. White-box examines internal code structure and logic paths.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q14. What is a memory profiler?
- A.A physical RAM module installed in the computer
- B.A tool monitoring memory usage and detecting leaks✓ Correct
- C.A compiler for translating source code to binaries
- D.A debugger for stepping through code line by line
Explanation
A memory profiler tracks memory allocations, usage patterns, and identifies memory leaks.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q15. What is the difference between stubs and mocks?
- A.Mocks are simpler and provide less functionality than stubs do
- B.They are identical testing concepts with no differences at all
- C.Stubs are more complex to implement than mocks in every case
- D.Stubs provide predefined responses; mocks also verify interactions✓ Correct
Explanation
Stubs return predefined data. Mocks also verify that they were called correctly.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q16. What is integration testing?
- A.Testing interaction between multiple components together✓ Correct
- B.Testing the user interface for visual correctness
- C.Testing individual functions in complete isolation
- D.Testing performance under heavy load conditions
Explanation
Integration testing verifies that different modules work correctly together.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q17. What is a mock object in testing?
- A.A simulated object mimicking real behavior for tests✓ Correct
- B.A real database connection used in production
- C.A randomly generated object with unpredictable state
- D.A deleted object that has been garbage collected
Explanation
A mock simulates the behavior of real dependencies, allowing isolated testing.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q18. What is the difference between manual and automated testing?
- A.There is no practical difference between the two testing methods
- B.Manual testing is done by humans; automated uses scripts and tools✓ Correct
- C.Automated testing is less reliable than manual in every case
- D.Manual testing is faster than automated testing for all suites
Explanation
Manual testing involves humans executing test cases. Automated testing uses scripts and tools for speed and repeatability.
Report an error in this question
Debugging, Testing & OptimizationHard
Q19. What is property-based testing?
- A.Specifying invariants that hold for all generated inputs✓ Correct
- B.Testing object properties for correct values and types
- C.Testing CSS properties for correct visual rendering
- D.Testing configuration properties for application behavior
Explanation
Property-based testing generates random inputs to verify that specified properties always hold.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q20. What is regression testing?
- A.Testing for performance regression and slower execution
- B.Re-running tests after changes to ensure nothing broke✓ Correct
- C.Testing only brand new features and functionality
- D.Testing backward compatibility with previous versions
Explanation
Regression testing re-executes existing tests to ensure changes haven't introduced new bugs.
Report an error in this question
Debugging, Testing & OptimizationMedium
Q21. What is profiling in software optimization?
- A.Writing documentation for the application source code
- B.Analyzing execution to identify performance bottlenecks✓ Correct
- C.Formatting code according to style guide conventions
- D.Creating user profiles for application personalization
Explanation
Profiling measures execution characteristics to identify performance bottlenecks.
Report an error in this question
Debugging, Testing & OptimizationHard
Q22. What is fuzzing?
- A.Making code intentionally unclear and hard to understand
- B.Feeding random or malformed data to find vulnerabilities✓ Correct
- C.A string operation for making text fuzzy and unreadable
- D.A sorting technique that introduces randomness into order
Explanation
Fuzzing generates random or semi-random inputs to find crashes, security holes, and unexpected behavior.
Report an error in this question
Debugging, Testing & OptimizationHard
Q23. What is mutation testing?
- A.Testing DNA sequences for mutations in bioinformatics apps
- B.Introducing small code changes to check if tests catch them✓ Correct
- C.Testing genetic algorithms for correct evolution behavior
- D.Testing code changes for backward compatibility with old code
Explanation
Mutation testing inserts small changes into source code and checks if the test suite detects them.
Report an error in this question
Debugging, Testing & OptimizationHard
Q24. What is the difference between static and dynamic analysis?
- A.Dynamic analysis is performed before compilation of the source code
- B.Static examines code without executing; dynamic examines during execution✓ Correct
- C.There is no meaningful difference between the two analysis approaches
- D.Static analysis is performed at runtime while the program is executing
Explanation
Static analysis inspects source code without running it. Dynamic analysis examines behavior during execution.
Report an error in this question
Debugging, Testing & OptimizationHard
Q25. What is a flame graph in performance analysis?
- A.An error graph displaying exception frequency over time
- B.A fire hazard visualization for safety monitoring apps
- C.A visualization of call stacks showing CPU time by code path✓ Correct
- D.A heat map showing temperature distribution across hardware
Explanation
A flame graph visualizes sampled stack traces, quickly revealing performance hotspots.
Report an error in this question
Debugging, Testing & OptimizationHard
Q26. What is chaos engineering?
- A.Random testing with no specific goals or expected outcomes
- B.Unstructured development without any planning or methods
- C.Creating intentionally buggy software for entertainment
- D.Intentionally introducing failures to test system resilience✓ Correct
Explanation
Chaos engineering deliberately injects failures into production systems to verify they can withstand disruptions.
Report an error in this question
Debugging, Testing & OptimizationHard
Q27. What is taint analysis?
- A.Analyzing memory allocation patterns for optimization purposes
- B.Tracking untrusted input flow to find security vulnerabilities✓ Correct
- C.Checking code for bugs using standard debugging tools
- D.Formatting code according to standard style guide conventions
Explanation
Taint analysis tracks data from untrusted sources to detect if it reaches sensitive operations without sanitization.
Report an error in this question
Debugging, Testing & OptimizationHard
Q28. What is the difference between correctness testing and performance testing?
- A.They are exactly the same type of testing with no differences
- B.Correctness verifies behavior; performance measures speed and resources✓ Correct
- C.Correctness testing measures execution speed like performance does
- D.Performance testing checks for bugs just like correctness testing
Explanation
Correctness testing ensures correct results. Performance testing measures response times and resource utilization under load.
Report an error in this question
Debugging, Testing & OptimizationHard
Q29. What is symbolic execution?
- A.Executing code with special symbol characters as input data
- B.Executing code with symbolic values to explore all possible paths✓ Correct
- C.A debugging mode that shows variable names instead of values
- D.Running code with special characters to test encoding correctness
Explanation
Symbolic execution uses symbolic inputs to explore all feasible execution paths, generating inputs that trigger specific paths or bugs.
Report an error in this question
Debugging, Testing & OptimizationHard
Q30. What is the difference between benchmarking and profiling?
- A.They are identical performance analysis methods with no differences
- B.Benchmarking measures overall metrics; profiling identifies bottlenecks✓ Correct
- C.Profiling gives overall performance metrics; benchmarking is specific
- D.Benchmarking provides more detailed analysis than profiling overall
Explanation
Benchmarking measures overall performance for comparison. Profiling breaks down performance per function to locate bottlenecks.
Report an error in this question