Exam 7: Arrays

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

The type used in the foreach expression must match the array type.

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

True

Array.Copy(waterDepth, 2, w, 0, 5); -The Copy( )method,shown above,is a(n)____________ method.

Free
(Short Answer)
4.8/5
(66)
Correct Answer:
Verified

static or class

To access an array element,you must specify which element is to be retrieved by placing an index inside ____________ following the array identifier

Free
(Short Answer)
4.7/5
(69)
Correct Answer:
Verified

square brackets

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

(Multiple Choice)
4.8/5
(91)

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

(Short Answer)
5.0/5
(85)

When you pass a single array element such as an integer,you are passing by reference.

(True/False)
4.7/5
(90)

Which of the following could be a method heading for a member method that returns an array?

(Multiple Choice)
4.8/5
(82)

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

(Multiple Choice)
5.0/5
(73)

Which of the following can be used to return an index of an item in an array?

(Multiple Choice)
4.9/5
(69)

The first element of an array is always referenced by index ____________.

(Short Answer)
5.0/5
(74)

All arrays,of any type,inherit characteristics from the ____________ class,which includes a number of predefined methods and properties.

(Short Answer)
4.8/5
(92)

All arrays are objects of the base type Array class.

(True/False)
4.7/5
(80)

foreach (int val in anotherArray) total += val; Using the above declaration along with the foreach loop,what is stored in total after the program statements are executed?

(Multiple Choice)
4.8/5
(78)

The length or size of the array is specified using a(n)____________ value in the form of a constant literal,a variable,or an expression that produces an integer value.

(Short Answer)
4.9/5
(64)

double [ ] price = new double [ ] {3, 2.2, 4.7, 6.1, 4}; -Looking above,the value of price.Length is 5.

(True/False)
4.7/5
(74)

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

(True/False)
4.8/5
(75)

All arrays are objects of the base type ____ class.

(Multiple Choice)
4.8/5
(82)

When you pass an array to a method,by default,a copy of each element in the array is made and passed to the method.

(True/False)
4.9/5
(86)

int [ ] anArray = new int [10]; int [ ] anotherArray = {6, 7, 4, 5, 6, 2, 3, 5, 9, 1}; -Which of the following would copy all of the elements from anotherArray to anArray?

(Multiple Choice)
4.8/5
(73)

____ creates a copy of the array and returns it as an object?

(Multiple Choice)
4.8/5
(79)
Showing 1 - 20 of 75
close modal

Filters

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