Each record of the file UN.txt contains four pieces of information (name, continent, population in millions, area) about one of the 192 member countries of the United Nations. The first two lines of the file are
Afghanistan,Asia,28.2,251772
Albania,Europe,3.2,11100
What is the first line of the file created by the following code?
Dim query = From line In IO.File.ReadAllLines("UN.txt")
Let data = line.Split(","c)
Let country = data(0)
Let continent = data(1)
Select country & " is in " & continent
IO.File.WriteAllLines("NewFile.txt", query)
A) Afghanistan is in Asia
B) Albania is in Europe
C) country is in continent
D) The new file will be empty.
Correct Answer:
Verified
Q1: The following statement could be used to
Q5: What method is used to copy the
Q6: What property is set to False in
Q7: Select the example statement below that would
Q8: Which of the following methods is used
Q9: The following statement causes the Open dialog
Q11: Which of the following statements is used
Q13: A statement of the form IO.File.WriteAllLines("fileName.txt", numArray)
Q14: Opening a file for input means that
A)
Q15: When an existing file is opened for
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents