Predict the output for below simple C# program:
static void Main(string args)
throw new NullReferenceException("C");
catch (ArithmeticException e)
0 of 1 questions completed
Please click on ‘Start Quiz’ to answer..
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading...
You must sign in or sign up to start the quiz.
You have to finish following quiz, to start this quiz:
0 of 1 questions answered correctly
Time has elapsed
Reference books, you may like:Programming WCF Services: Design and Build Maintainable Service-Oriented Systems
WCF Multi-Layer Services Development with Entity Framework, 4th Edition
Learning WCF: A Hands-on Guide
You have reached 0 of 0 points, (0)
Question 1 of 1
Please choose correct answer from options below :Correct
Great !! You got it right!!Incorrect
Sorry, this is incorrect.
try block is throwing NullPointerException but the catch block is used to counter Arithmetic Exception. Hence NullPointerException occurs since no catch is there which can handle it, runtime error occurs.
© 2015, admin. All rights reserved.