C# Exception Handling Interview Questions and Answers - 1
Question: 1
Define error?
Errors are mistakes that can make a program go wrong.
It is common to make mistakes while developing as well as typing a program.
An error may produce an incorrect output or may terminate the execution of the program.
Question: 2
What is compile time error?
These kinds of errors are occurred during the program typing.
So the C# compiler does not create the “.CS” file.
It also list out the error with the details.
Question: 3
Can multiple catch blocks be executed?
No, once the proper catch code fires off, the control is transferred to the finally block (if there are any), and then whatever follows the finally block.
Question: 4
What is runtime error?
The program may compile successfully and creates executable version but the program produce wrong results.
These are due to the problem called runtime error.
Question: 5
What is the use of finally statement?
The set of statements that will execute when a try/catch block is left.
To specify a block of code to execute when a try/catch block is exited, include a finally block at the end of a try/catch sequence.
Rock and Soil Class 8 Questions and Answers Pdf More
Class 8 Exploring Continents Africa, Australia, Antarctica More
Geography Hydrologic Cycle Class 8 Questions and Answers More
TNPSC Migration and Urbanisation Research Questions More
Migration and Urbanisation MCQ Questions and Answers Pdf More
Medieval Indian History GK Quiz Questions and Answers More
1000+ IBPS PO Previous Year Puzzle Questions More
1000+ Input and Output Devices MCQ Questions and Answers Pdf More
Force and Motion Objective MCQ Quiz Questions & Answers Pdf More
Java String Manipulation Interview Questions with Answers More