Errors are unexpected conditions that are not part of the normal operation of a program. Examples of common errors are:
- Out of memory.
- Out of disk space.
- Invalid file name.
- Attempting to write to a read-only file.
- Attempting to read a non-existent file.
- Requesting a system service that is not supported.
Compilation error:
Compilation error refers to a state when a compiler fails to compile a piece of computer program source code, either due to errors in the code, or, more unusually, due to errors in the compiler itself. A compilation error message often helps programmers debugging the source code for possible errors. Although the exact definitions of compilation and interpretation are a bit vague, generally compilation errors are only referring to static compilation and not dynamic compilation. However, it is important to note that dynamic compilation can still technically have compilation errors, although many programmers and sources may identify them as run-time errors. Most just-in-time compilers
Run Time error:
Runtime errors are the errors that occur during the
execution of the program. Some examples are, dividing by zero error,
insufficient memory for dynamic memory allocation, referencing an out-of-range
array element. These are not detected by compiler while compilation process. A
program with these kinds of errors will run but produce erroneous results or may
cause termination of program. Detection and removal of a run-time error is a
difficult task.
Logical error:
Logic errors are the ones you make as a programmer, when the code doesn't work as you expected it to. These can be hard to track down. Fortunately,
0 comments:
Post a Comment