________ errors are detected when we have not followed the rules of the particular programming language while writing a program.
________ errors are detected when we have not followed the rules of the particular programming language while writing a program.
Solution
A syntax error occurs when the program breaks the grammar rules of the programming language, such as a missing colon, an unmatched bracket or a misspelt keyword. The compiler or interpreter detects it before the program runs and refuses to execute the code until it is fixed.
Logical error: the program runs without complaint but gives wrong output because the logic is flawed, and the translator does not report it.
Runtime error: the program starts but crashes during execution, for example on division by zero.
Related questions:
2026: 31 May Shift 1
2026: 26 May Shift 1
2025: 22 May Shift 1
2025: 16 May Shift 1
2025: 20 May Shift 1