83.9k views
2 votes
Which of the following is an example of a syntax error?

producing output before accepting input

subtracting when you meant to add

misspelling a programming language word

all of the above

1 Answer

0 votes

Answer:

misspelling a programming language word

Step-by-step explanation:

Syntax error is the type of error in programming, when the programmer insert some symbol that is not present in directories or libraries, the programmer not followed the rules of that particular programming language that is understandable to compiler.

For example in C++, it is necessary to insert the semicolon (;) after each statement. If the programmer not insert the semicolon after each statement, the program will show the syntax error.

If the programmer use integer instead of int to assign datatype to the variable in C++, it will also leads to the syntax error. Because in C++ library, Integer is defined with the help of "int".