📢 Too many exams? Don’t know which one suits you best? Book Your Free Expert 👉 call Now!

  • google app store apple app store
  • ✖

      Question

      A program compiles successfully but produces incorrect

      output for certain inputs. What type of error is this most likely to be?
      A Syntax Error Correct Answer Incorrect Answer
      B Runtime Error Correct Answer Incorrect Answer
      C Logic Error Correct Answer Incorrect Answer
      D Compilation Error Correct Answer Incorrect Answer
      E Linker Error Correct Answer Incorrect Answer

      Solution

      Syntax Errors prevent compilation.        Runtime Errors occur during execution and cause the program to crash (e.g., division by zero).        Logic Errors allow the program to compile and run without crashing, but it produces unintended or incorrect results because the algorithm or implementation logic is flawed.

      Practice Next
      ask-question