All mock tests are FREE till 31 December — register to save your progress

Which of the following is NOT a logical error?

Pick an option to check yourself, or open the answer below.

Show answer & explanation

Correct answer: D. Using commas instead of the two required semicolons in a for loop header

Explanation

Commas in place of the semicolons of a for header is a syntax error caught by the compiler. The others compile but behave wrongly.

More Programming Languages and Computer Graphics questions