Name the type of error in the statement given below:
int p=20,m=0,n;
n=p/m;
1. Syntax
2. Runtime
3. Logical
4. None of the above
Answers
Answered by
1
Answer:
c answer is always right
Answered by
0
Logical error:-
In computer programming, a logic error is a bug in a program that causes it to operate incorrectly, but not to terminate abnormally (or crash). A logic error produces unintended or undesired output or other behaviour, although it may not immediately be recognized as such.
given,
int p=20,m=0,n;
n=p/m;
hence, the correct option is logical error.
Similar questions