There are the following errors can occur:
Syntax Error:
A collection of rules for writing programs in a programming language is known as syntax. Syntax error is a type of error that occurs when an invalid statement is written in program. Complier detects syntax errors. A program containing syntax error cannot be complied successfully.
There can be many causes of syntax errors. Some important causes are as follows:
The statement terminator is missing at the end of statement.
A variable is used without declaration.
Logical errors
A type of error that occurs due to poor logic of the programmer is known s logical error. A logical error occurs when the program follows a faulty algorithm. A statement with logical error may produce unexpected and wrong results in the program.
These errors are difficult to find because compiler does not detect these errors. It can only be detected by examining the program thoroughly.
Run Time Errors
A type error that occurs during the execution of program is known as run time error. It is caused when a statement directs the computer to execute an illegal operation such as dividing a number by zero.
These are commonly caused due to wrong input from the user.
Syntax Error:
A collection of rules for writing programs in a programming language is known as syntax. Syntax error is a type of error that occurs when an invalid statement is written in program. Complier detects syntax errors. A program containing syntax error cannot be complied successfully.
There can be many causes of syntax errors. Some important causes are as follows:
The statement terminator is missing at the end of statement.
A variable is used without declaration.
Logical errors
A type of error that occurs due to poor logic of the programmer is known s logical error. A logical error occurs when the program follows a faulty algorithm. A statement with logical error may produce unexpected and wrong results in the program.
These errors are difficult to find because compiler does not detect these errors. It can only be detected by examining the program thoroughly.
Run Time Errors
A type error that occurs during the execution of program is known as run time error. It is caused when a statement directs the computer to execute an illegal operation such as dividing a number by zero.
These are commonly caused due to wrong input from the user.