Question 81Asked in BPSC TRE 2.0 (2023) Computer Class 9-10

The C++ code which causes abnormal termination/behaviour of a program should be written under _____ block.

  1. Acatch
  2. Bthrow
  3. Ctry
  4. DMore than one of the above
  5. ENone of the above
Show answerHide answer

Correct answer: (C) try

Explanation

Code that may raise an exception is placed inside a try block so that a matching catch block can handle it.

From BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper

This is question 81 of BPSC TRE 2.0 (2023) Computer Class 9-10 — Previous Year Paper. See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.