Which error occurs due to incorrect grammar in programming?
-
A
Logic error
-
B
Runtime error
-
C
Syntax error
Correct answer
-
D
Semantic error
Correct answer
C. Syntax error
9 views
Explanation
Syntax errors occur when the code violates the grammar rules of the programming language. Source: mcqs.almcqs.com, Chapter 2, Q20.
Reference
Asked in: Matric,FBISE
Doubts & discussion
Not sure why the answer is C? Ask here and get an explanation.
Ask a doubt about this MCQ