Computer Science, asked by kurmapusuchitra, 8 months ago

What is the best way to think about a "syntax error"while programming

Answers

Answered by bhoomidarak
0

Answer:

Here are few examples of syntax error to avoid:

Explanation:

This is caught by the compiler at the time of Compilation.

It occurs in the following situations:

◦ the semicolon is missing

◦ keywords are misspelt or typed in uppercase

◦ curly braces “{“ or parenthesis “(“ is missing

◦ identifiers are not valid,

◦ variables are not declared

◦ When identifiers are not valid

◦ When 2 operands and/or literals occur continuously without an operator in between them : Eg., int x =2y; // it should be 2*y

Similar questions