answersLogoWhite

0


Best Answer

Semantic or Syntax errors are errors in the way a programmer has written his code. The code does not conform to language standards and is incorrect.

Ex:

for(int i = 0, i++, i<10) {

}

The above is a syntactically incorrect declaration of a for loop in Java. The compiler would not let you compile this code successfully.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

A semantic error is one that will not be caught by the compiler (it is not a syntax error), but will produce undesirable or unpredictable results during the execution of the program. For example, a loop that uses "while(x = 5)" will still compile, but will run indefinitely, because x will be set to 5 each time, and any non-zero value will continue a while loop. Assuming x is used within the loop, it would also produce erroneous results.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are Semantic errors in a programming language?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Typographical errors or incorrect use of the programming language are referred to as?

Syntax errors


Where can I find information on what ira rollovers are?

Syntax/Semantic Language, a small programming language. Or Swedish Sign Language, used in Sweden to communicate non-verbaly. Or System Simulation Ltd. for software engineering.


What government agency controls 401(k) regulations?

Syntax/Semantic Language, a small programming language. Or Swedish Sign Language, used in Sweden to communicate non-verbaly. Or System Simulation Ltd. for software engineering.d


How much does it cost per month for a comprehensive medical insurance?

Syntax/Semantic Language, a small programming language. Or Swedish Sign Language, used in Sweden to communicate non-verbaly. Or System Simulation Ltd. for software engineering.s


What is lexical and semantic errors?

cars was


What is interrupt handler service?

They are the ones that reports errors when compiling codes in an programming language.


What is semantic grammar?

Semantic grammar: an engineering technique for constructing natural language understanding systems


Is XML a programming language?

It is programming languages that are referred to in terms of "high level" and "low level".Extensible Markup Language(XML) is a markup language not a programming language, it is a data formatting specification that makes the presentation of data independent of programs (so that data can be passed between programs).For this reason the answer to your question is "neither".


How do you understand errors?

Errors are bugs or mistakes.It coulb be syntax or semantic in nature.


How computer handle semantic error?

Semantic error are logical errors. That does mean, it would compile and run without errors. But, the output would be different from the expected output.


Is the B programming language a high or low level programming language?

The B programming language is a high-levelprogramming language.


Where did IBM get their programming language?

Computer programming language