Computer Science, asked by prem3972, 1 year ago

guyz what is logical error? give some valuable points to thz guyz

Answers

Answered by PriyaSharma80
1
 A logic error (or logical error) is a mistake in a program's source code that results in incorrect or unexpected behavior. It is a type of runtime error that may simply produce the wrong output or may cause a program to crash while running. Many different types of programming mistakes can cause logic errors.


HOPE IT HELPS YOU

prem3972: can u say what is the function of it
prem3972: and y it is called as logic error
Answered by Anonymous
1

What is a logical error?

Logical error is an error made in programming where the logic of the question is not followed.

It does not produce the required output in the program

However the program compiles correctly.

Examples

When the question asks to write a code , input 2 numbers then add them and produce the output of sum. But instead of adding you subtracted the numbers then the output will be wrong however the program will compile

When you asked to find the area of a square and you wrote the volume of cube, then the desired output will be wrong. However the program will compile because of no syntax or run time errors


Hope it helps :)

_________________________________________________________________


prem3972: k tq fr ur reply
Anonymous: welcome
prem3972: pls follow me
prem3972: ur answers are pretty good
Anonymous: sorry i cant follow u
prem3972: r u happy
prem3972: sry dude I repeated the Sams question in the chat
Anonymous: its ok
prem3972: I was about to ask u what is run time error
Anonymous: ok wait answering u
Similar questions