An error in a program that results in the program outputting $100 instead of the correct answer, $250 is
a) a programmer errorb) a syntax error
c) a run-time error
d) a logical error
e) a snafu
Answer: d.
Explanation: While this is an error (answer a), programmers classify the type of error in order to more easily solve the problem. Syntax errors are caught by the compiler and the program cannot run without fixing all syntax errors. Run-time errors arise during program execution and cause the program to stop running. Logical errors are errors whereby the program can run to completion, but gives the wrong answer. If the result should have been $250, then the logic of the program is wrong since it output $100. A snafu is a term expressing a messed up situation in combat and should not be used by respectable programmers!