Sunday, October 3, 2010

BLOG TASK 2

Answer the following questions:


1. Which of the following procedures can be used to read information from a sequential access file? ALL OF THEM?
  1. AppendText
  2. CreateText
  3. OpenText


2. 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? MY ANSWER: msg = inFile.ReadLine
  1. msg = inFile.Read
  2. msg = inFile.ReadLine
  3. inFile.ReadLine(msg)


3. Write the statement required to close the file associated with the inFile variable.
inFile.Close()


4. If a sequential access file contains another character to read, what does the Peek method return?
The Peek method returns the character


5. If a sequential access file does not contain another character to read, what does the Peek method return?
it will return the number -1 (negative 1)

No comments:

Post a Comment