exception handling c programming questions

16.

Which of the following is NOT an Exception?
A.     StackOverflow
B.     Division By Zero
C.     Insufficient Memory
D.     Incorrect Arithmetic Expression
E.     Arithmetic overflow or underflow
Answer & Explanation

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.
View Answer Workspace Report Discuss in Forum
17.

Which of the following statements is correct about the C#.NET program given below if a value “ABCD” is input to it?

using System;
namespace IndiabixConsoleApplication
{
class MyProgram
{
static void Main(string[] args)
{
int index;
int vat = 88;
int[] a = new int(5];
try
{
Console.Write(“Enter a number: “);
index = Convert.Toint32(Console.ReadLine());
a[index] = val;
}
catch(Exception e)
{
Console.Write(“Exception occurred”);
}
Console.Write(“Remaining program”);
}
}
}

A.     It will output: Exception occurred
B.     It will output: Remaining program
C.     It will output: Remaining program Exception occurred
D.     It will output: Exception occurred Remaining program
E.     The value 88 will get assigned to a[0].
Answer & Explanation

Answer: Option D

Explanation:

No answer description available for this question. Let us discuss.
View Answer Workspace Report Discuss in Forum
18.

It is compulsory for all classes whose objects can be thrown with throw statement to be derived from System.Exception class.
A.     True    B.     False
Answer & Explanation

Answer: Option B

Explanation:

No answer description available for this question.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top