Different types of errors can occur while writing a C program. These errors include the syntax errors, logical errors and run-time errors. These types of errors should be remove from the C program for this purpose i also advise you :-
- Syntax Errors
A misspelled , semicolon is not written are Syntax errors.
"forr" instead of "for" is example of this type of error.
- Logical Errors
Using condition "x>5" instead of "x<5" is example of Logical Error.
This is most difficult to find because compiler can not detect these types of errors. It also takes alot of time. The programmer must review whole the program then he can identify the error.
- Run-Time Errors
These types of errors occur during the execution. The user may ask the program to open a file that does not exist.
Most Difficult Type Error
Logical error because :-
- It cannot detected by the compiler.
- It does not crash the program.
- The user need to review the whole program.
- It may take a lot of time for detecting logical errors.
Note :- You must write the program with full attention. Beginners will make more mistakes but after sometime you will be expert and there will be no mistake. Do mistakes and learn from it.
No comments:
Post a Comment