If you attempt to open a file with the Open file mode, what happens if the file does not exist?

A. The file is created and then opened for use.
B. The program returns a prompt to the user asking if the file should be created.
C. The program will return a null object, and all data written to the file will be discarded.
D. The program throws a System.IO.FileNotFoundException error.


Answer: D

Computer Science & Information Technology

You might also like to view...

Given a class named Animals and a class variable named ducky which will reference an Animals object, which is the correct way, using the textbook's pseudocode, to create an Animals object?

a. Set ducky = Animals() b. Set Animals = New ducky() c. Set ducky = New Animals() d. Set ducky = New Animals object

Computer Science & Information Technology

The contents of the ____________________ section of a report are printed at the end of every page of the report.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

When cell contents are copied or moved, they are placed on the ________

Fill in the blank(s) with correct word

Computer Science & Information Technology

Giving personnel access to only data that they absolutely need to perform their jobs is referred to as _________

a. Least privileges b. Job rotation c. Business continuation planning d. None of the above

Computer Science & Information Technology