GIAC
GSSP-NET · Question #272
GSSP-NET Question #272: Real Exam Question with Answer & Explanation
Sign in or unlock GSSP-NET to reveal the answer and full explanation for question #272. The question stem and answer options stay visible for context.
Question
Peter works as a Software Developer for PentaSoft Inc. He develops an application, named App1, using Visual C# .NET. The application is intended to deal with several file input and output operations. He uses the following try structure in the application code to handle errors that occur during the execution of App1. try { //Statements that might cause a runtime error. } catch (System.IO.FileNotFoundException ex) { //Statements } catch (System.IO.PathTooLongException ex) { //Statements } catch (System.IO.IOException ex) { //Statements } catch (Exception ex) { //Statements } What will happen if an exception of type System.IO.DirectoryNotFoundException occurs in the try block?
Options
- AThe catch block that handles an exception of type IOException will be executed.
- BThe catch block that handles an exception of type Exception will be executed.
- CThe catch block that handles an exception of type FileNotFoundException will be executed.
- DThe catch block that handles an exception of type PathTooLongException will be executed.
Unlock GSSP-NET to see the answer
You've previewed enough free GSSP-NET questions. Unlock GSSP-NET for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.