Which of the following errors are possible within a COBOL if statement?
-
Infinite loop
-
Logical Error
-
Runtime Error
-
All of the above
D
Correct answer
Explanation
COBOL IF statements can exhibit all three error types: infinite loops (when improperly nested in loops with incorrect exit logic), logical errors (incorrect condition logic leading to wrong execution path), and runtime errors (comparing incompatible data types or operating on invalid data).