Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 19 1 pts --Consider the following array: int[.] numbers = {{1,2}, {34, 149, {67, {8,9)); What value will the following expression yield for total?

image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Question 19 1 pts --Consider the following array: int[.] numbers = {{1,2}, {34, 149, {67, {8,9)); What value will the following expression yield for total? total-numb1 numbers[2,0) 04 O 12 Question 20 1 pts -Consider the following array: intL] numbers-I12), {3,4), [45], {6,7)(8,9)); What row index value would be required to create this two-dimensional array? 02 4 D Question 21 1 pts --Based on the code below numbers[3,1] is initialized to int[,] numbers 75,90), 9,25], (23,56), 16,12 0 6 O 12 O 23 0 56 Question 22 1 pts --Based on the code below numbers[3,0] is initialized to int[,] numbers 75,90), 9,25], [23,56), [6,12)]; O 12 O 23 0 56 D Question 23 1 pts Based on the code below numbers[2,1] is initialized to intL.] numbers 75,90), [9,25], 123,56), (6,12)) O 25 O 23 O 56 O 75 Question 24 1 pts -Based on the code below numbers[2,0] is initialized to intl] numbers [175,90), 9,25), (23,56), (6,12]): O 25 O 23 56 0 75 Question 25 1 pts --Based on the code below numbers[1,1] is initialized to intl] numbers 175,90),9.25), (23,56], [6,12 O 25 0 75 O 90 Question 26 1 pts --Based on the code below numbers(0,0) is initialized to int[,] numbers 75,90), 9,25], (23,56), 16,12 0 9 O 25 O 75 O 90 DQuestion 27 1 pts -Which of the following correctly declares an array of real numbers (assume that ARRAYSIZE is a valid constant)? O doublell taxRates new double ARRAYSIZE]; double[] taxRates - double[ARRAYSIZE] O taxRates = new double[ARRAYSIZEJ; double[] taxRates Question 28 1 pts Which statement declares an array called myList that will contain five real numbers given the following constant declaration. const int ARRAYSIZE 5 O doublell myList new double[ARRAYSIZE]; double[] myList double[ARRAYSIZE]: myList-new double[ARRAYSIZE]; myList new double Question 29 1 pts Given the following code fragment, what value is contained in myArr[2]? const int ARRAYSIZE 3; doublell myArr- new double[ARRAYSIZE]; myArr[O]-1.1; myArr[1] 2.2; myArr[2]-myArr[O]+myArr[1] 3.3 2.2 O 1.1 Question 30 1 pts - Given the following code fragment, what value is contained in myArr[1]? const int ARRAYS IZE- 3; double[] myArr ew double [ARRAYSIZE] myArr [0-1.1 myArr [1] = 2.2; myArr [ 2 ] = myArr [ 0 ] + myArr [ 1 ] ; O 3.3 2.2 1.1 O o Question 31 1 pts Given the following code fragment, what value is contained in myArr[O]? const int ARRAYSIZE-3; double[] myArr new double [ARRAYSIZE]: myArr [0-1.1 myArr1-2.2 O 3.3 O 2.2 0 1.1 Question 32 1 pts Given the following code fragment, what is displayed in lblResult? const int ARRAYSIZE 3: double[] myArr -new double [ARRAYSIZE] myArr [0]-1.1 myArr [1)-2.2 myArr [2] = myArr[0] + myArr [1]; lblResult.Text-Convert.ToString (myArr [O) 3.3 O 2.2 1.1 O 0 Question 33 1 pts Given the following code fragment, what is displayed in lblResult? const int ARRAYSIZE = 3; intl] myArr -new int [ARRAYSIZE] myArr [0]-1.1; myArr [1-2.2 myArr [2]-myArr I0 myArr [1]: lblResult.Text -Convert.ToString (myArr [1]) O 3.3 O 2.2 O 1.1 0 Question 34 1 pts A(n) is a group of variables that have the same name and data type, and are related in some way O subscript O string array run time error D Question 35 1 pts An array is defined as follows: int[] numbers-new int[4] How many elements does the array have? O One O Two O Three Four Question 36 1 pts Assigning initial values to an array is often referred to as_ O sorting the array populating the array O assigning the array declaring the array D Question 37 1 pts Which of the following correctly declares an array of integers? Assume SIZE is a valid constant. numbersArray- new int[SIZE] intl numbersArray- new int[SIZE]; wholeNum[] numbersArray -int[SIZE int[] numbersArray new Array D Question 38 1 pts -Given the following code fragment, what is the content of the last array element? const int ARRAYS IZE = 3; double[] myArr = new double [ARRAYS IZE]; myArr [O] = 1.1; myArr[1] = 2.2; myArr [2] = 3.3; 1.1 O 2.2 O 3.3 all of the above Question 39 1 pts Given the following code fragment, what is the content of the first array element? const int ARRAYSIZE = 3; double] myArr - new double [ARRAYSIZE]; myArr [0]-1.1; myArr [1] 2.2; myArr [2] = 3 . 3 ; O 1.1 O 2.2 O 3.3 none of the above DQuestion 40 1 pts - Given the following code fragment, what is displayed in IblResult? const int ARRAYSIZE 3; doublel] myArr new double[ARRAYSIZE] myArr[o]-1.1 myArr[1]-2.2; myArr[2]-myArr[O] myArr[1]: lblResult.Text Convert.ToString(myArr[2]) 3.3 2.2 o 1.1 O 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Microsoft SQL Server 2012 Unleashed

Authors: Ray Rankins, Paul Bertucci

1st Edition

0133408507, 9780133408508

More Books

Students also viewed these Databases questions