What is a logic error in programming?

Answer:
A logic error is when the program compiles as expected, but runs in an unexpected way. For instance, say you write a method to sort an array. It compiles fine, but after you run it the array is still unsorted. This is a logic error.
First answer by Afraca. Last edit by Tjmcsaxy. Contributor trust: 0 [recommend contributor recommended]. Question popularity: 23 [recommend question].