Question: Question 1 (2 points) Arrays are objects and have a fixed length. Question 1 options: True False Question 2 (2 points) Given an array of

Question 1 (2 points)

Arrays are objects and have a fixed length.

Question 1 options:

True
False

Question 2 (2 points)

Given an array of doubles a= { 1.5, 2.1, 3.3, 4.1};

This will print the contents of the array to the screen:

PRINT (array)

Question 2 options:

True
False

Question 3 (2 points)

This block of code will print the contents of the array to the console.

string[] capitals = { "Sofia", "Washington", "London", "Paris" };

FOREACH ( string capital in the array capitals)

PRINT capital

Question 3 options:

True
False

Question 4 (2 points)

Which of the following is an incorrect process for declaring and initializing an array?

Question 4 options:

int [] nums={3, 6, 4, 2, 1};

int[] myArray = new int[6];

int[] arr = new int[5];

for (int i = 0; i < arr.Length; i++)

{

arr[i] = i;

}

int[] myNums = new int[] { 6, 5, 7, 10 };

None, all 4 processes are correct.

Question 5 (2 points)

For searching a 2D array of ints, called nums, to find the largest value, the local variable int biggest should be set which of the following values?

Question 5 options:

0

the first element of the array nums

any value not in the array nums

-1

Submit Quiz0 of 5 questions saved

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!