Errors:
Syntax Errors:
Errors that occurs when you violates the rules of writing C syntaxes are known as Syntax errors.This compiler errors indicates something must be fixed so that code can be compiled.
For example:printf("%d",(x,y))Correction:printf("%d",(x,y)); /* ; terminator is added*/
Runtime Errors:
Errors which occur during runtime or during execution of program(one-time) after successful execution of a program.
For example:n=9;div=n/0; /* Wrong logic */Solution: A number cant be divided by 0.
Linker Errors:
These errors occur when after the compilation we link the different object files with main obect.
For example:using Main() instead of main().
Logical errors:
On compilation and execution of a program when desired output is not obtained when certain input values are given. These types of errors which provide incorrect output but appears to be error-free are called logical errors.
Semantic Errors:
These errors occur when statement written in the program is not meaningful to compiler.
For example:a+b=c; /* not meaningful to compiler*/
Corect statement:
c=a+b;
0 Comments
Doubts? Please let our team know So that we can serve you better.