Multiple Choice
Each line 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 population = 1000000 * CDbl(data(2) ) Let area = CDbl(data(3) )
Let density = population / area
Select country & "," & density.ToString("N1")
IO.File.WriteAllLines("NewFile.txt", query)
A) Afganistan,28200000/251772
B) Afganistan,112.0
C) Afganistan,112.006100757829
D) country,density
Correct Answer:

Verified
Correct Answer:
Verified
Q38: Select the example statement below that would
Q39: What method is used to copy the
Q40: The following statement could be used to
Q41: In the line of code sw =
Q42: Element names are case sensitive.
Q44: When you place the OpenFileDialog control on
Q45: The following statements are valid.<br>Dim filespec As
Q46: Opening a file for output means that<br>A)
Q47: Which of the following exceptions will be
Q48: The value of sr.EndOfStream is True when