What is Logical Error?

What is logical error

Logical Error

Some errors occur due to poor logic of a programmer. These type of errors are called “Logical Errors”. These errors are very difficult to find because compiler does not report any error message for logical errors. A programmer reviews all program again to find errors. For example If you write incorrect formula for calculating area of circle then logical error will occur and it causes incorrect results.

Reasons of Logical Error

  • Using wrong conditions in a program such as writing A<5 instead of A>5.
  • Use of wrong formula in program such as writing Average = Total *5 instead of Average = Total / 5.

Post a Comment

Previous Post Next Post