Skip to main content

Exception Handling In C Sharp — Part 1 MCQs with Explanations

Practice high-yield Programming & Software Development MCQs on Exception Handling In C Sharp — Part 1 with worked academic solutions for FPSC, PPSC, NTS, NITB, PTS.

Questions
40
Difficulty Level
Exam-Level
Target Exams
FPSC, PPSC, NTS...
Estimated Time
48 mins
Exam-Level FPSC PPSC NTS NITB PTS
Verified for Commission Syllabus • Oct 14, 2026
40

Verified Practice Questions

Interactive test mode with detailed academic worked solutions

Live Progress | 0/40 answered
✓ 0 correct ✗ 0 wrong 0% score
Question 1 of 40
★ FPSC ★ PPSC

What is the purpose of exception handling in C#?

Question 2 of 40
★ FPSC ★ PPSC

Which keyword is used to catch exceptions in C#?

Question 3 of 40
★ FPSC ★ PPSC

What is the default exception handler in C# called?

Question 4 of 40
★ FPSC ★ PPSC

In C#, which block is used to clean up resources in exception handling, regardless of whether an exception occurs or not?

Question 5 of 40
★ FPSC ★ PPSC

What is the base class for all exceptions in C#?

Question 6 of 40
★ FPSC ★ PPSC

In C#, which statement is used to explicitly throw an exception?

Question 7 of 40
★ FPSC ★ PPSC

What is the purpose of the finally block in exception handling in C#?

Question 8 of 40
★ FPSC ★ PPSC

In C#, what happens if an exception is thrown within a finally block?

Question 9 of 40
★ FPSC ★ PPSC

Which of the following statements about the try-catch block in C# is true?

Question 10 of 40
★ FPSC ★ PPSC

What is the purpose of the throw statement in C#?

Question 11 of 40
★ FPSC ★ PPSC

In C#, which method is called automatically when an exception occurs but is not caught by the program?

Question 12 of 40
★ FPSC ★ PPSC

In C#, what is the purpose of the try block in exception handling?

Question 13 of 40
★ FPSC ★ PPSC

What happens if an exception occurs but is not caught by the program in C#?

Question 14 of 40
★ FPSC ★ PPSC

In C#, which statement is used to re-throw an exception while preserving the original call stack information?

Question 15 of 40
★ FPSC ★ PPSC

In C#, which statement is used to specify code that should run regardless of whether an exception occurs or not?

Question 16 of 40
★ FPSC ★ PPSC

What is the purpose of the using statement in C# exception handling?

Question 17 of 40
★ FPSC ★ PPSC

Which of the following statements about exceptions in C# is true?

Question 18 of 40
★ FPSC ★ PPSC

In C#, what is the method called on an exception object to retrieve information about the error that occurred?

Question 19 of 40
★ FPSC ★ PPSC

What is the purpose of the throw statement in C# exception handling?

Question 20 of 40
★ FPSC ★ PPSC

In C#, what happens if an exception occurs inside a catch block?

Question 21 of 40
★ FPSC ★ PPSC

Which of the following is NOT a standard exception class provided by .NET Framework in C#?

Question 22 of 40
★ FPSC ★ PPSC

In C#, which keyword is used to specify that a method can throw a particular type of exception?

Question 23 of 40
★ FPSC ★ PPSC

What is the process of converting a custom exception object into a standard exception object in C# called?

Question 24 of 40
★ FPSC ★ PPSC

In C#, what happens if no catch block matches the exception type thrown in a try block?

Question 25 of 40
★ FPSC ★ PPSC

In C#, which block is used to handle exceptions that may occur within a try block?

Question 26 of 40
★ FPSC ★ PPSC

What is the purpose of the finally block in C# exception handling?

Question 27 of 40
★ FPSC ★ PPSC

Which statement is used to throw an exception in C#?

Question 28 of 40
★ FPSC ★ PPSC

In C#, which of the following keywords is used to define a custom exception class?

Question 29 of 40
★ FPSC ★ PPSC

What is the term for an exception that occurs during the execution of a program in C#?

Question 30 of 40
★ FPSC ★ PPSC

In C#, what is the purpose of the using statement in exception handling?

Question 31 of 40
★ FPSC ★ PPSC

Which keyword is used to specify a block of code where an exception might occur in C#?

Question 32 of 40
★ FPSC ★ PPSC

In C#, which class is the base class for all exceptions?

Question 33 of 40
★ FPSC ★ PPSC

What is the purpose of the catch block in C# exception handling?

Question 34 of 40
★ FPSC ★ PPSC

What is the term for handling an exception and continuing program execution in C#?

Question 35 of 40
★ FPSC ★ PPSC

In C#, what happens if an exception is thrown inside a finally block?

Question 36 of 40
★ FPSC ★ PPSC

What is the purpose of the try-catch block in C#?

Question 37 of 40
★ FPSC ★ PPSC

Which statement is used to specify code that should always run regardless of whether an exception occurs in C#?

Question 38 of 40
★ FPSC ★ PPSC

What will be the output of the following C# code? class student { int []scores = new int[3] {13, 32, 24}; public int this[int index] { get { if (index < 3) return scores[index]; else { Console.WriteLine("invalid index"); return 0; } } private set { if (index < 3) scores[index] = value; else Console.WriteLine("invalid index"); } } } class Program { public static void Main(string[] args) { student s = new student(); int[] scores1 = new int[3] {8, 19, 40}; for (int i = 0; i < 3; i++) { if (scores1[i] > s[i]) { Console.WriteLine(" scores1 had greater value :" + scores1[i]); } else { Console.WriteLine("scores had greater value :" + s[i]); } } Console.ReadLine(); } }

Question 39 of 40
★ FPSC ★ PPSC

What will be the output of the following C# code snippet? { try { int a, b; b = 0; a = 10 / b; Console.WriteLine("A"); } catch(ArithmeticException e) { Console.WriteLine("B"); } Console.ReadLine(); }

Question 40 of 40
★ FPSC ★ PPSC

What will be the output of the following C# code snippet? class Output { public static void main(String args[]) { try { int a = 0; int b = 5; int c = a / b - 5; Console.WriteLine("C"); } finally { Console.WriteLine("sharp"); } } }

✓ Link copied to clipboard
Continue Your Practice

Advance Html — Part 1

Master the next curriculum module with 40 exam-standard MCQs.

Next Practice Set →

💡 Examiner's Advisory for Programming & Software Development

In competitive commission exams (FPSC, PPSC, KPPSC, SPSC, CSS, PMS), questions are frequently phrased with distractor options designed to catch rote learners. Whenever you answer an MCQ, read the Detailed Academic Explanation and Conceptual Anchor to understand why the remaining options are incorrect.

More Modules in Programming & Software Development

View All →
📚

Study Guides

Topic summaries and syllabus breakdown

Explore Guides →
🎯

Complete Library

Search through 78,000+ verified MCQs

Browse Library →
📱

Mobile App

Offline mock tests and instant bookmarks

Get Mobile App →