Which of the following statements are correct about exception handling in C#.NET? 1. If an exception occurs then the program terminates abruptly without getting any chance to recover from the exception. 2. No matter whether an exception occurs or not, the statements in the finally clause (if present) will get executed. 3. A program can contain multiple finally clauses. 4. A finally clause is written outside the try block. 5. finally clause is used to perform clean up operations like closing the network/database connections.

- Online Exam Test Papers | - MCQs[multiple choice questions and answers ] | - Mock Test Papers | - Practice Papers | - Sample Test Papers |

Question:
Which of the following statements are correct about exception handling in C#.NET?

1. If an exception occurs then the program terminates abruptly without getting any chance to recover from the exception.
2. No matter whether an exception occurs or not, the statements in the finally clause (if present) will get executed.
3. A program can contain multiple finally clauses.
4. A finally clause is written outside the try block.
5. finally clause is used to perform clean up operations like closing the network/database connections.

1.1 only

2.2 only

3. 2 and 5 only

4.3 and 4 only

Posted Date:-2021-02-25 10:08:49


More MCQS Questions and answers

Search
R4R Team
R4Rin Top Tutorials are Core Java,Hibernate ,Spring,Sturts.The content on R4R.in website is done by expert team not only with the help of books but along with the strong professional knowledge in all context like coding,designing, marketing,etc!