A syntax error is detected:
-
A
At runtime
-
B
Before execution
Correct answer
-
C
After execution
-
D
Never
Correct answer
B. Before execution
10 views
Explanation
Syntax errors are caught by the interpreter or compiler before the program runs. Logical errors are only noticed when the output is wrong.
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is B? Ask here and get an explanation.
Ask a doubt about this MCQ