Program errors in C – Basics of C++ Programming

Program errors in C & C++

[xyz-ihs snippet=”Google-Adsense”]

Program errors in C – There are three types of program errors which can occur in C or other programming languages. These errors are explained below:

1) Syntax Error:

This type of error occurs when the rule of writing statement is violated in the programming language. Such as in C, typing print instead of printf will show the syntax error. The compiler is able to detect syntax errors.

[xyz-ihs snippet=”200-x-90″]

2) Runtime Error:

Runtime error occurs if the program tries to perform an illegal action such as dividing a number by zero. They are called runtime errors because they occur during the execution of the program. The computer stops running the program when the runtime error occurs.

[xyz-ihs snippet=”200-x-90″]

3) Logical Error:

Logical error occurs when the program follows a wrong logic. The compiler cannot detect these errors and it can result in wrong output. It is very difficult to identify the logical error.

“My posts/articles/images are not allowed to be stolen/copied anywhere at Cyber space. Doing so will allow me to take a legal action against the copier.”

[xyz-ihs snippet=”200-x-90″]

Related Posts

Leave a Comment

Kindly solve the following puzzle to prove that you\'re not a bot: