Solved

Which of the Following Code Segments Will Read the Following

Question 3

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

Related Questions

Unlock this Answer For Free Now!

View this answer and more for free by performing one of the following actions

qr-code

Scan the QR code to install the App and get 2 free unlocks

upload documents

Unlock quizzes for free by uploading documents