Exception Handling

Q1:
Which of the following statements are correct about the exception reported below?
Unhandled Exception: System.lndexOutOfRangeException: Index was outside the bounds of the array: at AptitudeCrackConsoleApplication.MyProgram.SetVal(Int32 index, Int32 val) in D:\Sample\AptitudeCrackConsoleApplication\MyProgram.cs:line 26 at AptitudeCrackConsoleApplication.MyProgram.Main(String[] args) in D:\Sample\AptitudeCrackConsoleApplication\MyProgram.cs:line 20
  1. The CLR failed to handle the exception.
  2. The class MyProgram belongs to the namespace MyProgram.
  3. The function SetVal() was called from Main() in line number 20.
  4. The exception occurred in line number 26 in the function SetVal()
  5. The runtime exception occurred in the project AptitudeCrackConsoleApplication.

A 1 only

B 1 and 2 only

C 3, 4 and 5 only

D All of the above

E None of the above

ANS:C - 3, 4 and 5 only

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.