What is the difference between a logic error and a run time error?
Runtime error occurs while running the program. It leads to stop the execution on the same line of the error. Example: 1. When you read array out of its allocation 2. When you trying to do divided by zero Logic is the incorrect operation with in code. It does not cause the program to stop execution. Example: If we want to calculate sum of two variables a and b then we do it using a+b But if you perform sum as a*b then it is the incorrect operation / logic error
Get Answers For Free
Most questions answered within 1 hours.