A

Admin • 828.03K Points
Coach

Q. What will be printed?

Code:
try
{
int x = int.Parse("abc");
}
catch(Exception)
{
Console.WriteLine("Error");
}
  • (A) abc
  • (B) 0
  • (C) Compilation error
  • (D) Error

Explanation by: Admin
Parsing invalid string throws an exception.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.