What is expression syntax error?

Updated: 10/17/2022
User Avatar

Wiki User

8y ago

Best Answer

A syntax error is a coding error that prevents successful compilation.


const int a = 42;

void foo (int);

void bar (int);

void foo () {

// syntax error: definition does not match prototype declaration

// reason: formal argument not defined

// solution: define formal argument


void bar (int b) {

if (a = b) {

// syntax error in expression: a = b

// reason: a is declared constant, cannot assign to constants outside of declaration

// solution: did you really mean a == b?



int main () {

// syntax error

// reason: return statement not found

// solution: return a value to host environment


User Avatar

Wiki User

8y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is expression syntax error?
Write your answer...
Still have questions?
magnify glass
Related questions

What is error 601?

On a RadioShack TRS 80, It is a Syntax Error "Syntax Error 601"

Any violation in the syntax of a program statement is called logic error?

No. A violation in the syntax of a program statement is called a syntax error.

Is syntax error a compilation error?

Not entirely. A compilation error can contain a syntax error, but what a syntax error actually is, is an error in how the coding is spelled. For example, say you are trying to program a router. You type in the code, of which you know it's the correct code, but receive an error. You proofread the code and notice that one or more of the words are not spelled correctly. This would be a syntax error. They can also take the form of misplacing the words in the code's syntax.

What are the ratings and certificates for Syntax Error - 2003?

Syntax Error - 2003 is rated/received certificates of: Australia:M

What is an Example of syntax error?


What type of errors we have in Java programming?

syntax error, Runtime error, Longic error

What type of error is detected when a pascal program is compiled?

syntax error

Difference between syntax error and execution error?

Syntax error is when something is wrong with how a code is written. An execution error occurs when the program comes up to something that it cannot handle because it does not have the code for it.

How do you remove syntax error on Casio fx-85GT PLUS Calculator?

If you have a syntax error on a Casio fx-85GT Plus calculator, you can press the or key which will give you the location of the error and you can then correct it.

What type of error provides an incorrect result but is not a syntax or run time error?

A logic error.

What does it mean when a webpage says 'syntax error'?

When a webpage displays a "Syntax Error" it means that the code for the particular page was written incorrectly and does not follow standard rules of the Syntax programming language so nothing except the error will be displayed as the code cannot be understood.

When does generally declaration syntax error occur?

All syntax errors occur at compile time.