461,642 views
18 votes
18 votes
Which of the following is an example of a syntax error in a program?

- A program is supposed to calculate the sum of three numbers, but displays the wrong answer.


- The programmer typed “nmae” instead of “name” when using a variable.


- A sprite in a block-based program won’t move backwards, only forwards.


- The music stops playing halfway through the program instead of continuing until the end.

User Callat
by
2.7k points

2 Answers

18 votes
18 votes
The second one because it is miss spelling something specific which leads to this type of error
User Oldrich Svec
by
3.0k points
8 votes
8 votes
Answer: The programer typed “nmae” instead of “name” when using a variable
Explanation: a syntax error is an error in the syntax of a sequence of characters or tokens that is intended to be written in a particular programming language. For compiled languages, syntax errors are detected at compile-time. A program will not compile until all syntax errors are corrected. the message “nmae” would be undeliverable because of a syntax error. Poorly or incorrectly formatted information might be entered by a programmer, end user, or even by computer software itself.
User Jefdaj
by
3.1k points