Definder - what does the word mean?

What is logic error?

A logic error that appears to be catastrophic, but is very easy to correct.

#include <iostream.h>
void main()
{
int num;
cout<<"Do NOT enter the number 1:";
cin>>num;
if(num=1)
cout<<"You idiot! I said NOT to enter the number 1!\n";
else
cout<<"Good job!\n";
}

👍29 👎11


logic error - video

loading

Logic error - what is it?

When the CS202 student conveniently forgets parenthesis at the top of their function

int main /* what is missing here ? */
{
...
}

👍33 👎11


What does "logic error" mean?

The cause of any unexpected and undesired outcome. Usually attributable to a fundamental lack of understanding of the underlying situation. Most logic errors are minor logic errors.

If I jam a fork into this electrical outlet, money will come out.

👍43 👎11