191k views
1 vote
If your program throws an IndexOutOfRangeException, and the only available catch block catches an Exception, ______________________. A. the Exception catch block executes the Exception B. an IndexOutOfRangeException catch block is generated automatically the IndexOutOfRangeC. catch block is bypassedD. Exception is thrown to the operating system

User Rajeshk
by
5.3k points

1 Answer

4 votes

Answer:

Option A is the correct answer for the above question.

Step-by-step explanation:

The Index Out Of Range exception is a type of Run exception which is generated on run time. It means when any user executes the software or program, then that program gives some error on the execution time by some coding problem or some value problem.

So this type of exception can be handle by the Catch block which is also stated by the option A. Hence A is the correct answer but the other is not because:-

  • Option B states that this exception is generated by the catch block which is not correct.
  • Option C states that the catch block passes the exception which is also not the correct.
  • Option D states that the exception is passed for the operating system, but it is passed to the catch block only.
User Chubby Boy
by
6.0k points