Wednesday, 10 September 2014

Types of errors

Different types of errors:
Error is a mistake or bug, which can be associated with programmer in
program, common programming errors in C can be classified into 3 types:
1. compilation errors.(syntax errors)
2. linker errors.
3. logical errors.
Compilation(syntax ) errors: these are raised when we compile the
program and can be located and corrected easily. Most common
compilation or syntax errors are.
· Undefined variable
· Redeclaration of variable
· Unterminated string character
· Missing semicolon ;
· Function call missing ( ,;”)
· Function should have prototype.
Linker errors: the program must be linked to the ‘C’ library. If it fails in
such case these errors are raised . most common errors are:
· Unable to link cos.obj
· Undefined symbol
Logical ( run time) errors: these are raised because of the due to logical
inefficiency. We can know them when program gets executed. It is very
difficult to locate them, most common logical errors are:
· Divide by zero
· Floating point error
· Null value

· Garbage result in printing.

No comments:

Post a Comment