Reference no: EM132218402
Question 1 : Which class allows you to use the Read() and ReadLine() methods to retrieve data from a text file?
Select one:
a. BinaryReader
b. FileReader
c. StreamReader
d. File
e. TextReader
Question 2 : Which of the following would store an integer in a binary file?
Select one:
a. Write7BitEncodedInt()
b. WriteInt()
c. WriteLine()
d. StoreInt()
e. none of the above
Question 3 : Which class allows you to use the Write () and WriteLine () methods to write data to a text file?
Select one:
a. File
b. FileWriter
c. BinaryWriter
d. StreamWriter
e. TextWriter
Question 4 : When you are finished processing a text file, you should:
Select one:
a. call the Finished() method
b. call the Close() method
c. reset the file
d. throw an exception
e. erase the file
Question 5 : To which namespace does the File class belong?
Select one:
a. System.Object
b. System.FileSystem
c. System.IO
d. Object
e. Object.IO
Question 6 : All of the following are exceptions classes that are thrown in conjunction with files, except:
Select one:
a. FileNotFoundException
b. EndOfStreamException
c. DirectoryNotFoundException
d. IOException
e. InvalidDataFileException
Question 7 : In Visual Studio, if you do not specify the full path of a file, what directory is used?
Select one:
a. C:\WorkDirectory
b. the project directory
c. C:\App_Data
d. bin\Debug or bin\Release
e. C:\
Question 8 : Using the verbatim string, you could write the full path of
C:\CSharpProjects\ ChI0\ WorkDirectory as:
Select one:
a. @"C:\CSharpProjects\ChI0\WorkDirectory"@
b. @"C:\\CSharpProjects\\ChI0\\WorkDirectory"
c. @"C:\CSharpprojects\ChI0\WorkDirectory"
d. "@C:\CSharpprojects\ChI0\WorkDirectory"
e. none of the above
Question 9 : All of the following methods of the BinaryReader class could be used to retrieve data, except:
Select one:
a. ReadChar()
b. Read()
c. ReadString()
d. ReadChars()
e. ReadInt()
Question 10 : Which of the following methods could be used to retrieve a decimal value from a binary file?
Select one:
a. ReadDoubleValue()
b. ReadDecimalValue()
c. ReadDec()
d. ReadNumber()
e. ReadDecimal()