Exam 7: Arrays

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

Given an array declared to hold 100 values, the smallest index that can be used with the array is ____.

Free
(Multiple Choice)
4.9/5
(74)
Correct Answer:
Verified

C

You create an array in much the same way you instantiate an object of a user-defined class, by using the new keyword at the time of declaration.

Free
(True/False)
4.8/5
(78)
Correct Answer:
Verified

True

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

Free
(True/False)
4.8/5
(81)
Correct Answer:
Verified

False

If an array is to be sent to a method, which of the following is a valid heading for a method?

(Multiple Choice)
4.8/5
(91)

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

(True/False)
4.8/5
(83)

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

(Multiple Choice)
4.9/5
(76)

You can declare an array without dimensioning its size, but the size must be determined before you can access it.

(True/False)
5.0/5
(69)

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.9/5
(76)

All arrays are objects of the base type Array class.

(True/False)
4.8/5
(92)

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

(True/False)
5.0/5
(83)

Elements in an array are sometimes referred to as ____________ variables.

(Short Answer)
4.8/5
(81)

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

(Multiple Choice)
4.9/5
(92)

Use the ____________ keyword to instantiate an object of an array.

(Short Answer)
4.9/5
(83)

If you use the params parameter type, params must appear both in the formal parameter list of the method heading and in the actual argument list.

(True/False)
4.8/5
(89)

double [ ] price = new double [ ] {3, 2.2, 4.7, 6.1, 4}; ​With the declaration above, price[5] generates a runtime error.

(True/False)
4.9/5
(81)

An entire array collection of data can be ordered alphabetically with a call to the Array class member method ____________.

(Short Answer)
4.9/5
(82)

One of the special properties in the Array class is Length. It returns ____.

(Multiple Choice)
4.9/5
(65)

When you use the assignment operator with an array, individual elements are copied to another memory location.

(True/False)
4.9/5
(90)

A limitation of the foreach loop structure when used with arrays is ____.

(Multiple Choice)
4.7/5
(76)

Use .NET predefined methods and properties whenever possible as opposed to writing newcode....

(True/False)
4.8/5
(78)
Showing 1 - 20 of 75
close modal

Filters

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