Multiple Choice
Which of the following code segments will read the following two lines from addressFile and place the data in two variables named strName, and strCity? Bob Johnson
Somewhere USA
A) Dim addressFile As System.IO.StreamReader addressFile = System.OpenText("address.txt")
StrName = addressFile.ReadLine()
StrCity = addressFile.ReadLine()
AddressFile.Close()
B) Dim addressFile As System.IO.StreamReader addressFile = System.IO.File.OpenText("address.txt")
StrName = addressFile.ReadLine()
StrCity = addressFile.ReadLine()
AddressFile.Close()
C) Dim addressFile As System.IO.StreamReader addressFile = OpenText("address.txt")
StrName = ReadLine(addressFile)
StrCity = ReadLine(addressFile)
Close()
D) Dim addressFile As System.IO.StreamReader addressFile = System.IO.File.OpenText("address.txt")
StrName = addressFile.Input()
StrCity = addressFile.Input()
Close()
Correct Answer:

Verified
Correct Answer:
Verified
Q26: This predefined constant moves the print position
Q27: This property allows the developer to specify
Q28: This control is used to display a
Q29: Visual Basic allows you to use a(n)
Q30: To change the color of text in
Q31: The method writes data to a file,
Q32: Identify the following statements which will: Format
Q33: The _method displays a dialog window when
Q34: Reports with columnar data should not use
Q36: All of the following steps must be