Errors in Computer Programming

Q#1: What is an error in computer programming? Describe its types.   

Ans: Error:

            Errors are the problems or the faults that occur in the program which cause the program to behave abnormally.

            The most common errors can be generally classified as follows:

i)                    Syntax Error:

Syntax error occurs when the code does not follow the syntax rule of the programming language. They can be mistakes such as misspelled keywords, a missing punctuation character, a missing bracket, or a missing closing parenthesis.

i)                    Run-Time Error:

Errors which occur during program execution (run-time) after successful compilation are called run-time errors. A run-time error occurs when a program is asked to do something that it cannot perform, resulting in a “crash”.

ii)                  Logical Error:

               Logical errors are those which prevent your program from doing what you expect it to do. On compilation and execution of a program, desired output is not obtained when certain input values are given. These type of error which provide incorrect output but appear to be error free are called logical errors.

Comments

Popular posts from this blog

Chapter # 3 Class IX

Components of Motherboard

Problem Solving Steps