Mask-group

Programming Errors in C Language



  • Errors are the problems or faults that occur in the program,which makes the behavior of the program abnormal.

  • Programming errors are known as bugs or faults and the process of removing their bugs is known as debugging. 

  • There are five types of errors that exist in C programming:

  1. Syntax error

  2. Run-time error

  3. Linker error

  4. Logical error

  5. Semantic error

Syntax error:

  • Syntax errors are also known as compilation errors as they occur at the compilation time.We can say that Syntax errors are thrown by the compilers. These errors mainly occurred due to the mistakes while typing or do not follow the syntax of the specified programming language. These errors can be easily debugged or corrected.

Run-time error:

 

  • Sometimes the errors exist during the execution time even after the successful compilation known as runtime error.When the program is running and it is not able to perform the operation is the main cause of the runtime error.These errors are very difficult to find, as the compiler does not point to these errors.

Linker error:

  • Linker errors are mainly generated when the executable file of the program is not created.This can happen either due to the wrong function prototyping or usage of the wrong header file.

Logical error:

  • The logical error is an error that leads to an undesired output.These errors produce the incorrect output,but they are error free.These types of mistakes are mainly done by beginners.

Semantic error:

  • Semantic errors are the errors that occurred when the statements are not understandable by the compiler.​​​​​​​