Which of the following errors are possible within a COBOL if statement?
-
Infinite loop
-
Logical Error
-
All of the above
-
None of the abov
D
Correct answer
Explanation
A COBOL IF statement itself cannot cause infinite loops (that requires PERFORM/GO TO), and syntax errors would be caught at compile time, not runtime logical errors. The statement asks which errors are possible 'within a COBOL if statement' - meaning inherent to the IF construct itself, not in the statements it executes. The answer is that none of these error types are inherent to IF.