(b) Name the type of error in each case
(i) Division by a variable that contains a value of zero.
(ii) Multiplication operator used when the operation should be division.
Answers
The types of errors are:
(i) Divide by zero is a Run time error.
This is not a syntax error, it is mostly operations that a system is not capable to do, so it throws a run time error.
Compiler will not identify these types of errors and will compile the output anyhow.
(ii) Wrong operator used is the Logical error.
It is the flaw while designing the code or program. It generates unexpected results.
(i) Divide by zero error occurs
(ii) The logical error will occur
Explanation:
(i) Divide by zero is Run time error it is not detected by the compiler So this type of error sometimes known as Run-Time error.We used exception handling in Java, C#,etc to detect these types of errors. When any variable is divided by another variable that contains the 0 in it.
(ii) When our need to perform the operation of division but we used Multiplication operator instead of Division Operator so logic is incorrect. The error in which logic is wrong called the logical error.
Learn More :
https://brainly.in/question/10113206