Answer :
Answer:
1. Logical errors
These aren't actually errors, in that they compile correctly and run and finish executing.
These are errors, that produce results that don't match with what was intended by the programmer.
For e.g. if you write a program that computes 2+2, your expected result would be 4. If the program is outputting 5 or something other than 4, then you have made a logical error.
////////////////////////////////////////////////////////////////////////////////////////////////////
2. Run-time errors
Run time errors are errors that happen when the code is executing. It's not raised when compiling.
Run time errors occurs when you try to access unassigned memory, like accessing an index of array that is out of bounds.
Run time errors also occurs when your program requires too much of memory from the OS (Stack overflow).
Termination of program (or program crashes) is the result of run time errors.