Debugging & Errors MCQs
Debugging & Errors MCQs
Class: 9 | Subject: Computer Science
Section: Introduction to Programming Concepts
Topic: Debugging & Errors
Based on CBSE Board Examination Pattern
Section: Introduction to Programming Concepts
Topic: Debugging & Errors
Based on CBSE Board Examination Pattern
Instructions: These Multiple Choice Questions (MCQs) are designed strictly as per the NCERT syllabus, making them ideal for CBSE Class 9 Computer Science examination standard.
1. An error in a program is called:
Answer: B
A bug is a mistake in a program that causes incorrect results or stops execution.
A bug is a mistake in a program that causes incorrect results or stops execution.
2. Debugging means:
Answer: B
Debugging is the systematic process of detecting and correcting errors in a program.
Debugging is the systematic process of detecting and correcting errors in a program.
3. Syntax errors occur when:
Answer: B
Syntax errors occur when the grammar rules of programming language are not followed.
Syntax errors occur when the grammar rules of programming language are not followed.
4. Logical errors affect:
Answer: A
Logical errors allow program to run but produce incorrect output.
Logical errors allow program to run but produce incorrect output.
5. Runtime errors occur:
Answer: A
Runtime errors happen while the program is running.
Runtime errors happen while the program is running.
6. Compiler detects:
Answer: A
Compiler identifies syntax errors during compilation.
Compiler identifies syntax errors during compilation.
7. Logical error example:
Answer: B
Using incorrect formula leads to wrong result though program runs.
Using incorrect formula leads to wrong result though program runs.
8. Debugging improves:
Answer: A
Debugging ensures program gives correct output.
Debugging ensures program gives correct output.
9. Missing bracket causes:
Answer: B
Missing bracket violates grammar rules.
Missing bracket violates grammar rules.
10. Dividing by zero causes:
Answer: C
Division by zero produces error during execution.
Division by zero produces error during execution.
11. Testing program helps to:
Answer: A
Testing identifies issues before final execution.
Testing identifies issues before final execution.
12. Debugger is a:
Answer: B
A debugger is software tool used to locate and fix errors.
A debugger is software tool used to locate and fix errors.
13. Logical errors are found by:
Answer: B
Testing and checking output helps identify logic mistakes.
Testing and checking output helps identify logic mistakes.
14. Syntax error prevents:
Answer: A
Program cannot compile if syntax errors exist.
Program cannot compile if syntax errors exist.
15. Runtime error occurs after:
Answer: A
It happens when program runs successfully after compilation.
It happens when program runs successfully after compilation.
16. Infinite loop is:
Answer: A
Infinite loop occurs due to incorrect logic condition.
Infinite loop occurs due to incorrect logic condition.
17. Correcting errors is part of:
Answer: B
Debugging fixes identified bugs.
Debugging fixes identified bugs.
18. Syntax errors are easy to detect because:
Answer: A
Compiler displays error message during compilation.
Compiler displays error message during compilation.
19. Logical errors are difficult because:
Answer: A
Program runs but produces wrong output without showing error.
Program runs but produces wrong output without showing error.
20. Debugging ensures program is:
Answer: A
After debugging, program becomes reliable and accurate.
After debugging, program becomes reliable and accurate.
