128k views
3 votes
How would you describe the difference between a syntax error and a logic error?

2 Answers

5 votes

Answer:

Step-by-step explanation:

A syntax error is where there is and error in the program, for instance

prnit(" hello world")

would be a syntax error.

A logic error is a bug in a program that causes it to operate incorrectly, but not to terminate abnormally (or crash).

User Skylar Saveland
by
4.5k points
1 vote

Answer:

hii

Explanation

syntax error: a syntax error is an error in the syntax of a sequence of characters or tokens that is intended to be written in compile-time. A program will not compile until all syntax errors are corrected.

logic error: logic error is a bug in a program that causes it to operate incorrectly, but not to terminate abnormally. A logic error produces unintended or undesired output or other behaviour, although it may not immediately be recognized as such.

User Kartik Sharma
by
4.5k points