0% found this document useful (0 votes)
24 views15 pages

Types of Error

Uploaded by

heremahakaal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views15 pages

Types of Error

Uploaded by

heremahakaal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 15

ERRORS

Errors are the problems or the faults that occur in


the program, which makes the behaviour of the
program abnormal, and experienced developers can
also make these faults.

 Programming errors are also known as the bugs


or faults.

The process of removing these bugs is known


as debugging.
ERRORS
These errors are detected either during the
time of compilation or execution.

The errors must be removed from the program


for the successful execution of the program.
TYPES OF ERRORS
SYNTAX ERRORS
Syntax errors are also known as the
compilation errors as they occurred at the
compilation time, or we can say that the syntax
errors are thrown by the compilers.

These errors are mainly occurred due to the


mistakes while typing or do not follow the syntax
of the specified programming language.
SYNTAX ERRORS

These mistakes are generally made by


beginners only because they are new to the
language.
COMMONLY OCCURRED SYNTAX ERRORS

If we miss the parenthesis (}) while writing the


code.
Displaying the value of a variable without its
declaration.
If we miss the semicolon (;) at the end of the
statement.
RUN TIME ERRORS/EXCEPTION
Sometimes the errors exist during the
execution-time even after the successful
compilation known as run-time errors.

The division by zero is the common example of


the run-time error. These errors are very difficult
to find, as the compiler does not point to these
errors. n/0
LINKER ERRORS
Linker errors are mainly generated when the
executable file of the program is not created.

This can be happened either due to the wrong


function prototyping or usage of the wrong
header file.

The most common linker error that occurs is


that we use Main() instead of main().
LOGICAL ERRORS
The logical error is an error that leads to an
undesired output. These errors produce the
incorrect output, but they are error-free, known
as logical errors.
These types of mistakes are mainly done by
beginners.
 The occurrence of these errors mainly
depends upon the logical thinking of the
developer.
SEMANTIC ERRORS

Semantic errors are the errors that occurred


when the statements are not understandable by
the compiler.
SEMANTIC ERRORS
Use of a un-initialized variable.
Int i=0;
i=i+2;

Type compatibility
int b = "javatpoint"; int b=10;

Errors in expressions
int a, b, c;
a+b = c; c=a+b;

Array index out of bound


int a[10]; //array declare 0 to 9 0—LB 9--UB
a[10] = 34;
CHARACTERSTICS OF GOOD PROGRAM
TOP DOWN
&
BOTTOM UP APPROACH

You might also like