0
5.1kviews
What is error? Explain different types of errors occurred in program.

Subject : Structured Programming Approach

Title : Fundamentals Of C-Programming

Marks : 4M

1 Answer
0
45views

Error:

While writing c programs, errors also known as bugs in the world of programming may occur unwillingly which may prevent the program to compile and run correctly as per the expectation of the programmer.

Types of errors:

Basically there are three types of errors in c programming:

  1. Runtime Errors: C runtime errors are those errors that occur during the execution of a c program and generally occur due to some illegal operation performed n the program.

  2. Compile Error: Compile errors are those errors that occur at the time of compilation of the program. C compile errors may be further classified as

    a) Syntax Errors: When the rules of the c programming language are not followed, the compiler will show syntax errors.

    b) Semantic Errors: Semantic errors are reported by the compiler when the statements written in the c program are not meaningful to the compiler.

  3. Logical Errors: Logical errors are the errors in the output of the program. The presence of logical errors leads to undesired or incorrect output and are caused due to error in the logic applied in the program to produce the desired output.Also, logical errors could not be detected by the compiler, and thus, programmers have to check the entire coding of a c program line by line.

Please log in to add an answer.

Continue reading...

The best way to discover useful content is by searching it.

Search