107k views
0 votes
An unexpected result is returned by the computer when a program is executed. Which has likely occurred?

an error
a compiler
an interpreter
a stepping function

User BKF
by
6.1k points

2 Answers

3 votes

Answer:

An error is right

Step-by-step explanation:

User Nikhil Khullar
by
6.3k points
2 votes

Answer:

an error

Step-by-step explanation:

When an unexpected result happens, it's either because the input data is not what the program expected (error in the input) or the calculation went wrong (error in the process).

An unexpected result can mean lots of different things. Maybe the program returned a value of 5 instead of 4. Maybe it exited without giving any result at all (while one was expected). Maybe it entered into an infinite loop.

A compiler and an interpreter are components responsible to compile or execute your code. They will raise the error flag but they're not the cause for it.

A stepping function can be one of the possible causes for error... like if you enter an infinite loop... but it's not "likely" the cause of an unexpected result.

User Colm Doyle
by
6.9k points