FUNDAMENTALS OF COMPUTER

COMPUTER PROGRAMMING FUNDAMENTALS

WHAT IS PROGRAMMING

Question [CLICK ON ANY CHOICE TO KNOW THE RIGHT ANSWER]
Where the program still runs but doesn’t do what the programmer wanted it to do.
A
Syntax error
B
Logical error
C
Either A or B
D
None of the above
Explanation: 

Detailed explanation-1: -Instead, the program runs successfully. But it doesn’t do what you wanted it to do. Programs with a logic error don’t behave as desired because you’ve programmed it to do the wrong thing. For this reason, logic errors make everything look like it’s working, because it is.

Detailed explanation-2: -Logic errors The program can run but does not do what it is expected to do. Logic errors can be caused by the programmer: incorrectly using logical operators, eg expecting a program to stop when the value of a variable reaches 5, but using <5 instead of <=5. incorrectly using Boolean operators.

Detailed explanation-3: -A logical error in a program is an error were the instructions given in the program do not accomplish the intended goal. Analogy. “Get me a cup of coffee.” is a logical error when the person intended to ask for a cup of tea. Example. In computer programs, this error can occur in many different forms.

Detailed explanation-4: -A logic error is an error in a program’s source code that gives way to unanticipated and erroneous behavior. A logic error is classified as a type of runtime error that can result in a program producing an incorrect output. It can also cause the program to crash when running.

There is 1 question to complete.