Solved

Suppose a Structure and an Array Are Created with the Code

Question 63

Multiple Choice

Suppose a structure and an array are created with the code
Structure Nation
Dim name As String
Dim continent As String
Dim population As Double 'in millions
Dim area As Double 'in square miles
End Structure
Dim nations(191) As Nation in the Declarations section of the Code editor and the array is filled with data for the 192 member nations of the UN. What will be displayed in the DataGridView control when the following code is executed?
Dim query = From country In nations
Where (country.continent = "Europe") And
country.name.StartsWith("S")
Let countryUC = country.name.ToUpper
Let pop = (1000000 * country.population) .ToString("N0")
Let area = (country.area) .ToString("N0")
Order By countryUC Ascending
Select countryUC, pop, area


A) Three columns, with headers country, population, and area. The grid will display the countries in Europe (along with their populations and areas) whose names begin with the letter S. The countries will be displayed capitalized in alphabetical order and their populations and areas will be formatted with commas as thousands separators.
B) Four columns, with headers countryUC, continent, pop, and area. The grid will display the countries in Europe (along with their continents, populations and areas) whose names begin with the letter S. The countries will be displayed capitalized in alphabetical order and their populations and areas will be formatted with commas as thousands separators.
C) Three columns, with headers countryUC, pop, and area. The grid will display the countries in Europe (along with their populations and areas) whose names begin with the letter S. The countries will be displayed capitalized in alphabetical order and their populations and areas will be formatted with commas as thousands separators.
D) Three columns, with headers countryUC, pop, and area. The grid will display the countries in Europe (along with their populations and areas) whose names begin with the letter S. The countries will be displayed capitalized in reverse alphabetical order and their populations and areas will be formatted with commas as thousands separators.

Correct Answer:

verifed

Verified

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

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