1. Which of the following methods can be used to open a sequential access file?
AppendText(), CreateText() and OpenText().
2. Which of the following writes the contents of the favouriteTuneTextBox’s Text property, followed by the newline character, to the sequential access file associated with the outFile variable?
outFile.WriteLine(favouriteTuneTextBox.Text)
3. What does IO in the syntax stand for?
Input/Output
4. Which of the following procedures can be used to read information from a sequential access file?
OpenText()
5. Which of the following reads a line of text from the file associated with the inFile variable and assigns the line of text (excluding the newline character) to the msg variable?
msg = inFile.ReadLine()
6. Write the statement required to close the file associated with the inFile variable.
inFile.Close()
7. If a sequential access file contains another character to read, what does the Peek method return?
The Peek method returns the next character if it exists otherwise it returns -1.
8. If a sequential access file does not contain another character to read, what does the Peek method return?
-1
No comments:
Post a Comment