Difference Between Semantic Error and Syntax Error

Difference between semantic error and syntax error

Logical Error (Semantic Error) Syntax Error
It ┬áis the error in the program’s logicIt is the grammatical rules that govern the way in which words, symbols, expressions are formed.
It is not identified by the compiler and interpreters during translation.It is responded (located) by the translator (compiler or interpreter) during translation.
If a program contains a logical error, it produces output is will not be accurate.If a program contains a syntax error, it will not produce output.
Any error has to be detected by comparing the output of the program with the desire output.Error is detected by the language translator
Documentation or reference or guideline of logic is not available to the usersDocumentation or reference of the set of rules syntax a made available to the users.
It can be solved only by experienced programmers Normal (fresh) graduates can debug syntax error.
Cost is high in correcting the semantic error since the program development team (system analyst, programmers) are needed to be involved to solve.Cost is low since normal users can solve this problem
It is complex and time consuming to debugIt is easier and not consuming to debug as a logical error.

also read this Click Here

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!