KnowledgeBoat Logo

Computer Applications

It is possible that the user may not be able to write an error-free program at one go. Due to this reason, debugging is significant. Debugging is used to eliminate errors from a program. Some of the examples describing the errors are given below:

(a) A number divided by zero.

(b) The user has applied multiplication sign, instead of division sign.

(c) Sum of p and q is to be divided by their difference using the statement p+q/p-q.

(d) While writing a Java statement, the user forgot to terminate the statement using semicolon.

Based on the above case, answer the following questions:

  1. What is the type of error in (a)?

    1. Syntax Error
    2. Logical error
    3. Runtime error
    4. Execution error
  2. What is the type of error in (b)?

    1. Logical error
    2. Syntax error
    3. Compiler error
    4. Execution error
  3. What is the type of error in (c)?

    1. Logical error
    2. Syntax error
    3. Runtime error
    4. Execution error
  4. What is the type of error in (d)?

    1. Syntax error
    2. Logical error
    3. Runtime error
    4. Compilation error

Input in Java

12 Likes

Answer

  1. Runtime error
  2. Logical error
  3. Logical error
  4. Syntax error

Answered By

8 Likes


Related Questions