Exam 13: Working with Files
Exam 1: Introduction to Computing and Programming75 Questions
Exam 2: Data Types and Expressions75 Questions
Exam 3: Methods and Behaviors75 Questions
Exam 4: Creating Your Own Classes75 Questions
Exam 5: Making Decisions75 Questions
Exam 6: Repeating Instructions75 Questions
Exam 7: Arrays75 Questions
Exam 8: Advanced Collections75 Questions
Exam 9: Introduction to Windows Programming75 Questions
Exam 10: Programming Based on Events74 Questions
Exam 11: Advanced Object-Oriented Programming Features75 Questions
Exam 12: Debugging and Handling Exceptions75 Questions
Exam 13: Working with Files75 Questions
Exam 14: Working with Databases75 Questions
Exam 15: Web-Based Applications75 Questions
Select questions type
When you place an @ in front of a string,the string becomes a(n)____.
(Multiple Choice)
4.9/5
(99)
The StreamWriter method(s)that clears all buffers for the current writer and causes any buffered data to be written to the underlying stream is ____.
(Multiple Choice)
4.8/5
(80)
With Visual Studio when you create a file (or attempt to access one),if a path is not
specified with the filename,the Apps\Debug subdirectory of the current project is used.
(True/False)
5.0/5
(83)
The constructor for the StreamWriter can include additional arguments indicating whether the file should be appended to or overwritten if it already exists.
(True/False)
4.9/5
(90)
Which exception is thrown when an attempt is made to access a file that does not exist?
(Multiple Choice)
4.7/5
(80)
StreamReader inFile = new StreamReader("name.txt");
while ((inValue = inFile.ReadLine()) != null)
-Which of the following is an abstract class that cannot be instantiated?
(Multiple Choice)
4.8/5
(99)
No exception is thrown if you attempt to close or open a file that does not exist.
(True/False)
4.9/5
(89)
Which of the following class belongs to the System.IO namespace?
(Multiple Choice)
4.8/5
(80)
StreamReader inFile = new StreamReader("name.txt");
while ((inValue = inFile.ReadLine()) != null)
-With the above code segment,how could you programmatically avoid having a FileNotFoundException or DirectoryNotFoundException exception thrown?
(Multiple Choice)
4.8/5
(77)
One of the static methods of the File class is ____________.Prior to writing program statements that access data in a file,you should always check to make sure the file is available by invoking this method.
(Short Answer)
4.9/5
(82)
StreamWriter outputFile = new StreamWriter("someOutputFileName");
StreamReader inputFile = new StreamReader("someInputFileName");
-The identifier that can be referenced in a WriteLine( )method with the declaration above is ____.
(Multiple Choice)
4.8/5
(69)
The Execution version of an application contains no debugging information and is considered an optimized solution.
(True/False)
4.9/5
(97)
In order to remove a StreamWriter object named writer,which is associated with a file in the project directory called "test.dta",you would write ____.
(Multiple Choice)
4.9/5
(98)
The ____________ class provides static methods that aid in creating and moving through folders and subdirectories.
(Short Answer)
4.8/5
(80)
The ____ class has implementations for Write( )and WriteLine( )methods similar to the Console class methods.
(Multiple Choice)
4.7/5
(81)
The abstract classes of Stream,TextWriter,and TextReader are defined for dealing with files in the ____ namespace.
(Multiple Choice)
4.8/5
(79)
The GetAttributes( )method of the File class returns a FileAttribute,like Archive,when it invoked.
(True/False)
4.8/5
(82)
StreamWriter outputFile = new StreamWriter("someOutputFileName");
StreamReader inputFile = new StreamReader("someInputFileName");
-If an invalid path is included with the constructor for a StreamWriter object,____.
(Multiple Choice)
4.7/5
(77)
Showing 21 - 40 of 75
Filters
- Essay(0)
- Multiple Choice(0)
- Short Answer(0)
- True False(0)
- Matching(0)