Exam 8: Arrays;Introduction to Exception Handling

arrow

10,062 students have unlocked this exam

  • Select Tags
search iconSearch Question
flashcardsStudy Flashcards
  • Select Tags

Consider array items,which contains the values 0,2,4,6 and 8.If method changeArray is called with changeArray(items,items[2]),what values are stored in items after the method has finished executing Public static void ChangeArray(int[] passedArray,int value) { PassedArray[value] = 12; Value = 5; }

(Multiple Choice)
4.8/5
(35)

An array must be declared and allocated in the same statement.

(True/False)
4.9/5
(41)

For the array in the previous question,what is the value returned by items[1, 0].

(Multiple Choice)
4.8/5
(48)

The foreach statement is preferred over the for statement when the indices of the elements in an array will be used in the body of the repetition statement.

(True/False)
4.7/5
(30)

Multi-dimensional arrays require two or more indices to identify particular elements.

(True/False)
4.9/5
(44)

Which of the following correctly declares and initializes a two-dimensional rectangular array of integers

(Multiple Choice)
4.8/5
(37)

Which of the following will not produce a compiler error

(Multiple Choice)
5.0/5
(34)

Arrays can be declared to hold only non-class data types.

(True/False)
4.9/5
(40)

In rectangular array items,which expression below retrieve the value at row 3 and column 5

(Multiple Choice)
4.8/5
(34)

Which of the following statements is false

(Multiple Choice)
4.8/5
(37)

An array with m rows and n columns is not: A.An m-by-n array. B.An n-by-m array. C.A two-dimensional array. D.An n times m dimensional array.

(Multiple Choice)
4.8/5
(31)

Attempting to access an array element out of the bounds of an array causes a(n)________.

(Multiple Choice)
4.9/5
(36)

Which of the following sets of statements creates a multidimensional array with 3 rows,where the first row contains 1 value,the second row contains 4 items and the final row contains 2 items ?

(Multiple Choice)
4.7/5
(30)

Variable-length argument lists allow you to create methods that receive an arbitrary number of arguments.

(True/False)
4.7/5
(35)

When dealing with multi-dimensional arrays,each "row" must be the same size.

(True/False)
4.8/5
(33)

[C#6] Initializing an auto-implemented property in its declaration is a C# 6 feature known as auto-property initializers.Which of the following is the general syntax for a read-write auto-implemented property with an initializer

(Multiple Choice)
4.8/5
(35)

When an exception is caught,the program can access the exception object's built-in ________ property to get the error message and display it.

(Multiple Choice)
4.9/5
(40)

By convention,the first set of brackets of a two-dimensional array identifies an element's column and the second identifies the row.

(True/False)
4.8/5
(38)

Which of the following correctly accesses element 13 of array Book

(Multiple Choice)
4.7/5
(28)

There are two types of multidimensional arrays:

(Multiple Choice)
4.8/5
(43)
Showing 61 - 80 of 90
close modal

Filters

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