Computer Science, asked by sarthakonia, 3 months ago

Differentiate between a syntax error and a semantic error with example.

Answers

Answered by rajulj0576
1

Answer:

It occurs when a statement that is not valid according to the grammar of the programming language. Some examples are: missing semicolons in C++, using undeclared variables in Java, etc. It referred to as semantic error. ... It occurs when a statement is syntactically valid but does not do what the programmer intended.

Answered by ashwanisk4
0

Answer:

It occurs when a statement that is not valid according to the grammar of the programming language. Some examples are: missing semicolons in C++, using undeclared variables in Java, etc. It referred to as semantic error. ... It occurs when a statement is syntactically valid but does not do what the programmer intended.

Explanation:

I hope that's helpful for you

MARK ME BRAINLIEST

Similar questions