| 1. |
Mention different types of errors. |
|
Answer» The different program errors are as follows: 1. Syntax error: It occurs when there is a violation in the grammatical rules of a programming language’s instructions. It happens at the time of compilation. Such errors need to be rectified before proceeding further. 2. Semantic errors: An error, which occurs due to the incorrect logic in a solution is called semantic error. It also occurs due to wrong use of grammar in the program? 3. Runtime Error: It occur at run-time. Such error cause a program to end abruptly or even cause system shut-down. Such errors are hard to detect and are known as ‘Bugs’ 4. Logical Error : It may happen that a program contains no syntax or run-time errors but still it doesn’t produce the correct output. It is because the developer has not understood the problem statement properly. These errors are hard to detect as well. It may need the algonithm to be modified in the design phase and changing sources code. |
|