SHARE
SPREAD
HELP

The Tradition of Sharing

Help your friends and juniors by posting answers to the questions that you know. Also post questions that are not available.


To start with, Sr2Jr’s first step is to reduce the expenses related to education. To achieve this goal Sr2Jr organized the textbook’s question and answers. Sr2Jr is community based and need your support to fill the question and answers. The question and answers posted will be available free of cost to all.

C# Programming: From Problem Analysis to Program Design

C# Programming: From Problem Analysis To Program Design

Authors:
Barbara Dolye
Exercise:
Exercises
Chapter:
Introduction To Computing And Programming
Edition:
4
ISBN:
9781285096261
Question:
1

 

Question

You run a program and it gives you the difference of two values as the output, instead of the sum of the values, as intended. This is what type of error?
a. syntax
b. analysis
c. coding
d. design
e. logic

Answer

Correct answer is e)  logic.

 

Explanation for the correct answer:

 

  • The program compiler errors found while running the program if the found syntax errors. It does not depend on logic of the program..
  • If the logic of the program code contains an error, it does not effect the execution of the program. It is not have any compiler errors and execute the program successfully, but it displays the inappropriate/incorrect results as per the question.
  • For example, If run a program and it gives you the difference of two values as the output, instead of the sum of the values is the logic error.  Consider the diffrence of two vlaues as the input.

Hence, the correct answer is e) logic.

0 0

Discussions

Post the discussion to improve the above solution.