Prepare for the 241 Computer Science Certification Exam with comprehensive flashcards and multiple choice questions. Enhance knowledge with explanations and hints to excel in your test journey!

Multiple Choice

Which of the following terms refers to a flaw in a program that can cause it to behave unexpectedly?

A bug is a flaw in the program’s code that can cause it to behave unexpectedly. Bugs arise from mistakes in logic, edge-case handling, or incorrect assumptions, and they’re the reason a program might produce wrong results or act in surprising ways. Warnings are just notices that something could be off and don’t by themselves change behavior. An error signals a problem that typically prevents part of the program from running, often as a symptom of a bug, while a crash is an abrupt termination due to an unrecoverable fault. So the term that best describes a flaw that can lead to unpredictable behavior is the bug. For example, a miscalculated index or forgotten variable initialization is a bug—the underlying defect that can cause the program to do something unintended.

A bug is a flaw in the program’s code that can cause it to behave unexpectedly. Bugs arise from mistakes in logic, edge-case handling, or incorrect assumptions, and they’re the reason a program might produce wrong results or act in surprising ways. Warnings are just notices that something could be off and don’t by themselves change behavior. An error signals a problem that typically prevents part of the program from running, often as a symptom of a bug, while a crash is an abrupt termination due to an unrecoverable fault. So the term that best describes a flaw that can lead to unpredictable behavior is the bug. For example, a miscalculated index or forgotten variable initialization is a bug—the underlying defect that can cause the program to do something unintended.