Complete Computer Knowledge Portal

Monday, May 13, 2013

Common Errors in Programming Languages

Following are the Most Common Errors in Programming Languages:

1) Syntax Errors: These are those types of errors that arise when a statement is not written as per the defined rules. This is the violation of rules. These types of errors are generated by the compiler. This may include:
a) Improper Termination of Statement.
b) Undeclared Variable use.
c) Missing Quotes
d) Missing Braces.


2) Logical Errors: These type of errors results in wrong output. These are generated due to wrong understanding of problem. For example: You want to calculate A+B but you have applied the logic A-B. No Doubt you will get the answer and program will execute but the result will be A-B in spite of A+B.

3) Latent Errors: This type of errors is hidden errors and arises when a particular type of data is used. For Example: let suppose you want to calculate (M+N) / (P-Q) and during execution value of P comes out equal to Q. Result will be (M+N)/0 i.e. divide by zero condition.

4) Run Time Errors:
These are those types of errors that prevent a program from working correctly. This may result in loss of contents of file on which you are working. Run time errors can occur if you are running software programs that are not compatible, your computer has memory problems, or if the computer has been infected with malicious software.

No comments:

Post a Comment