Live Help (Start Chat)
View Count: 0
Duration: 47 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 25 mins
Accessed date:
Not Yet Viewed
View Count: 0
Duration: 18 mins
Accessed date:
Not Yet Viewed
Post your comment / feedback here
 
 

Be the first one to comment about this video

Question No: 1 of 24
An Exception of type________ is thrown if a value of object type cannot be assigned to a variable on the LHS. 
Options:
  1. ArgumentNullException
  2. OverflowException
  3. InvalidCastException
  4. VerificationException
View Answer/Explanation:
c
Explanation:
InvalidCastException occurs when an explicit cast is applied to a type that is not in the same path of the type hierarchy.

Question No: 2 of 24
Which of these handles an Exception that is not caught in user program (Even in the main function)? 
Options:
  1. .CLR
  2. .Frame Work
  3. .Both
  4. None
View Answer/Explanation:
a
Explanation:
The Common Language Runtime will handle the exception and the program terminates. CLR manages the execution of programs written in any of .net supported languages, allowing them to share common object oriented classes.

Question No: 3 of 24
Do multiple catch blocks execute simultaneously? 
Options:
  1. Yes
  2. No
View Answer/Explanation:
b
Explanation:
No. After a proper catch code fires and completes execution of exception block, the control is transferred to the finally block (if there are any), and then executes the statements which follows the finally block.

Question No: 4 of 24
In .NET the base class for every exception is: 
Options:
  1. System.Type
  2. System.Exception
  3. System.ExcpetionHandling
  4. ApplicationException
View Answer/Explanation:
b
Explanation:
Exception encapsulates all the data required for properly handling an exception in the catch block. System.Exception is the base class for all exceptions.

Question No: 5 of 24
Exception is ________ because it can encapsulate the data required for properly handling exception in catch block 
Options:
  1. Class
  2. Field member
  3. Variable
  4. Object
View Answer/Explanation:
d
Explanation:
Exception objects that describe an error are created and then thrown with the “throw “keyword. The runtime then searches for the most compatible exception handler.

Question No: 6 of 24
For a given try, the catch block of __________ class must be always after the catch block of ___________ class 
Options:
  1. Parent, child
  2. Child, parent
  3. Child, child
  4. Parent, parent
View Answer/Explanation:
a
Explanation:
try { try { } Catch (Exception ed) { } } Catch (Exception ex) { }

Question No: 7 of 24
Can a variable declared in try block accessed in catch block? 
Options:
  1. Yes
  2. No
  3. can’t say
View Answer/Explanation:
b
Explanation:
Try block ends with the starting of catch block so the scope of variables within try is limited to try block only.

Question No: 8 of 24
Every user-defined exception class inherits from _________ 
Options:
  1. System.Exception
  2. System.Userdefined
  3. System.Object
  4. System.Type
View Answer/Explanation:
a
Explanation:
System.Exception is the base exception class and all exceptions in .NET are derived from System.Exception

Question No: 9 of 24
Can we use goto and return in finally block? 
Options:
  1. Yes
  2. No
  3. Can’t say
View Answer/Explanation:
b
Explanation:
The finally block is useful for cleaning up any resources allocated in the”try” block as well as running any code that must execute even if there is an exception. Control is always passed to the finally block regardless of how the try block exits.

Question No: 10 of 24
What is an Exception? 
Options:
  1. It is an event
  2. Disrupts the normal execution of program
  3. It is the base class for all exceptions in System namespace
  4. All the above
View Answer/Explanation:
d
Explanation:
An exception is an event, which occurs during the execution of a program that disrupts the normal flow of the program's instructions

  1