types of errors in programing language C


Types of Errors: 
 
1.1. Syntax Errors
2. Run time Errors
2.1. Segmentation fault
2.2. Division by zero
2.3. Value out of range  


Syntax Errors:
Usually spelling mistakes. These errors are picked up by the compiler.

Run-time Errors:
This is an error that occurs during run-time of the program and is usually the result of something that has not been coded by the programmer.
eg. The user typing a character when a number is required, or a disc is full and a file cannot be created.

Logical Errors:
This is when the programmer has not coded the program to correctly process the input data. The output of the program may be unpredictable and therefore wrong.

The following errors are explained in simple words those are:
It occurs when syntax error is made
ex:if you miss ; after int x c compiler make error at runtime
Runtime error
runtime errors occur if you do mistake at programming running level
ex:if u divide any number with 0 it will make a error
if u declare a array int a[10] but you give 11 value it will be a run time error
Logical error
some times predicted output does not come that is logical error

Translate

 

Copyright 2008 All Rights Reserved Revolution Two Church theme by Brian Gardner Converted into Blogger Template by Bloganol dot com