Difficulty: Easy
Correct Answer: A logical error in a program
Explanation:
Introduction / Context:
Developers, testers, and users all use the term “bug,” but its scope matters for defect tracking and prevention. In most engineering contexts, a bug is a fault in software behavior that causes incorrect results or nonconformance with requirements.
Given Data / Assumptions:
Concept / Approach:
Syntax errors are caught by compilers/interpreters before execution; they prevent building or running but are often categorized separately as “compile errors.” Bugs typically refer to defects in implemented logic (or unexpected runtime behavior) that compile successfully yet produce wrong outputs or states. Hence, the precise match in the given options is “a logical error in a program.”
Step-by-Step Solution:
Verification / Alternative check:
Defect taxonomies in QA guidebooks classify syntax as “static errors” and runtime/logic faults as “bugs/defects,” aligning with the chosen definition in typical exam contexts.
Why Other Options Are Wrong:
Common Pitfalls:
Calling every compiler message a “bug,” which dilutes defect tracking and blurs responsibility between coding and build stages.
Final Answer:
A logical error in a program
Discussion & Comments