CJCoding With Joseph
15free / daySign inCreate account
Back to Multiple Choice Quiz

Select topics to narrow your question pool, then enable Random to jump to a random question matching your filters.

Topics

Catching a Specific Exception

C# quiz · Question 36
mediumExceptions

What does this code print?

Code

1try {
2 int[] a = new int[2];
3 Console.Write(a[5]);
4}
5catch (IndexOutOfRangeException) {
6 Console.Write("caught");
7}