3.
Errors in C-language
- Syntax error
- Logical error
- Math error
- Run time error
- Linker error
- Semantic error
1.Syntax error:-
If any changes made in the predefined format of a c-language then the error is called syntax error.
Eg:-If semicolon missing or printf,scanf or other keyword are missing comes under syntax error.
2.Logical error:-
This error occurs when the user gets and an unaccepted output.
Eg:- If the program is expected to give the output in real number but we are getting the output in integer.
3.Math error:-
This error occurs because of the illegal input.
Eg:-An number divided by zero is illegal modulus operator will not work for floating value.
4.Run time error:-
An error occurs at a time of exception is known as run time error.
Eg:-In the syntax of scanf & is missing .
5.Linker error:-
These error occurs when after compilation we link the different object files with main’s object using Ctrl+F9 key(RUN). These are errors generated when the executable of the program cannot be generated. This may be due to wrong function prototyping, incorrect header files. One of the most common linker error is writing Main() instead of main().
6.semantic error:-
This error occurs when the statements written in the program are not meaningful to the compiler.
End
If you like this content then you can share it and for any issues you can direct contact with me from Home Page.
For regular updates you can also follow my site.
Comments
Post a Comment