220k views
4 votes
Difference between logical errors and syntax errors​

1 Answer

5 votes
Since computer programs must follow strict syntax to compile correctly, any aspects of the code that do not conform to the syntax of the programming language will produce a syntax error. A logic error (or logical error) is a 'bug' or mistake in a program's source code that results in incorrect or unexpected behaviour.
User Sundq
by
5.9k points