DEVRY CIS170B WEEK 5 quiz

Question # 00030284 Posted By: steve_jobs Updated on: 11/02/2014 09:06 AM Due on: 12/12/2014
Subject Computer Science Topic General Computer Science Tutorials:
Question
Dot Image

(TCO 11) An array is a list of data items that _____.

share the same data type

are all integers

have different faces

the different flavors

Comments:

Question 2. Question :

(TCO 11) Which statement is true about this array declaration?

int [] myArray = {1,4,3,5,6};

It declares a 5 dimensional array.

The size of the array is five.

It sets the element myArray[1] to 1.

It won't compile due to a syntax error.

Comments:

Question 3. Question :

(TCO 11) What will be the output of this code?

int[] size = {2,3,5,6,4,5};

Array.Sort(size);

foreach (int

val in size)

Console.Write("{0} ", val);

2 3 5 6 4 5

5 4 6 5 3 2

6 5 5 4 3 2

2 3 4 5 5 6

Comments:

Question 4. Question :

(TCO 11) When a single array element, such as myArray[2], is passed to a method, the method receives _____.

a copy of the array

the starting address of the array

the address of the element

a copy of the value in the element

Comments:

Question 5. Question :

(TCO 12) The size of a(n) _____ must be determined when the program is written, whereas elements of a(n) _____ can be added or deleted at runtime.

array, ArrayList

ArrayList, array

array, Array class

ArrayList, Array class

Comments:

Question 6. Question :

(TCO 12) In your program, myList was declared as an ArrayList. To append the number 7 to the end of myList, write _____.

myList.Add(7);

myList.Append(7);

myList.Insert(7);

myList.Set(7);

Comments:

Question 7. Question :

This is a valid statement:

decimal [] price = new decimal[5];

True False

Comments:

Question 8. Question :

In the following, we can code height[1,1] in a two-dimensional array that will have values

like this (this is partial code): height = { {2.1, 3.2, 6.5, 7.2},

{5.4, 6.7, 3.5, 3.6} };

True False

Comments:

Question 9. Question :

The following is valid code for a one-dimensional array:

int[] size = {2,3,5,6,4,5};

True False

Comments:

Question 10. Question :

ArrayList “Count” property to give the user the current number of integers with a value of '1' in TempArray.

True False

Comments:

* Times are displayed in (GMT-07:00) Mountain Time (US & Canada)

Dot Image
Tutorials for this Question
  1. Tutorial # 00029729 Posted By: steve_jobs Posted on: 11/02/2014 09:07 AM
    Puchased By: 4
    Tutorial Preview
    The solution of DEVRY CIS170B WEEK 5 quiz...
    Attachments
    DEVRY_CIS170B_WEEK_5_quiz.docx (49.06 KB)
    Recent Feedback
    Rated By Feedback Comments Rated On
    fa...unga Rating Provide assignments on time 09/24/2015
    sol...00027 Rating Price offered are budget friendly 05/05/2015

Great! We have found the solution of this question!

Whatsapp Lisa