Solved

Which of the Following Code Segments Will Read the Following

Question 35

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:

verifed

Verified

Unlock this answer now
Get Access to more Verified Answers free of charge

Related Questions