Exam 7: Arrays

arrow
  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

If you do not know how many entries will be stored with the array,you could dimension it ____.

(Multiple Choice)
4.9/5
(75)

Given an array declaration of int anArray[1000],which of the following would be a valid heading for a method that sends the array in as a parameter?

(Multiple Choice)
4.8/5
(81)

Arrays are reference variables.

(True/False)
4.7/5
(82)

int [ ] anArray = new int [10]; int [ ] anotherArray = {6, 7, 4, 5, 6, 2, 3, 5, 9, 1}; -How could all values of anotherArray be totaled?

(Multiple Choice)
4.8/5
(71)

int [ ] anArray = new int [10]; int [ ] anotherArray = {6, 7, 4, 5, 6, 2, 3, 5, 9, 1}; -anotherArray.Length returns ____.

(Multiple Choice)
4.9/5
(77)

To declare an array,the value(s)used inside the square bracket can be a constant literal,a variable,or an expression that produces an integral value.

(True/False)
4.8/5
(85)

Array identifiers are normally defined using a plural noun.

(True/False)
4.9/5
(87)

Properties are added to a class to enable client applications to access public members.

(True/False)
4.8/5
(99)

Given an array declaration of int anArray[1000],which of the following would be a valid call to a DisplayContents( )method to send the full array into the method as an argument?

(Multiple Choice)
4.7/5
(86)

When a method uses the params modifier,it indicates that the number of arguments to the method may vary.

(True/False)
4.9/5
(76)

The Clear( )method of the Array class sets all integer elements to zero.

(True/False)
4.9/5
(67)

int [ ] score = {86,66,76,92,95,88}; for (int i = score.Length-1;i > -1;i--) { Total += score[i]; } Using the declaration above for score,what is added to total during the first iteration?

(Multiple Choice)
4.7/5
(71)

All data values placed in an array must be of the same ____________.

(Short Answer)
4.8/5
(85)

Given an array declared to hold 100 values,the largest index that can be used with the array is:

(Multiple Choice)
4.7/5
(67)

Because arrays are reference types,the ref keyword is required with the argument and parameter list.

(True/False)
4.9/5
(76)

The index is also referred to as the ____ of the array.

(Multiple Choice)
4.8/5
(66)

A parallel array is used to create string arrays because multiple characters are included within each element.

(True/False)
4.8/5
(81)

For an array that is dimensioned with a Length of 100,valid subscripts are 0 through 100.

(True/False)
4.8/5
(65)

Arrays can be used as fields or instance variables in classes;and,arrays of objects can be declared.

(True/False)
4.9/5
(76)

Which of the following is a valid example of calling a method and sending it an array argument?

(Multiple Choice)
4.8/5
(81)
Showing 41 - 60 of 75
close modal

Filters

  • Essay(0)
  • Multiple Choice(0)
  • Short Answer(0)
  • True False(0)
  • Matching(0)