Exam 9: Arrays

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

Which method would you most likely use to add an element to an end of a vector?

(Multiple Choice)
4.9/5
(30)

If a method has both a variable length formal parameter and other types of formal parameters, then the variable length formal parameter must be the first formal parameter of the formal parameter list.

(True/False)
4.9/5
(44)

The statement dataType[][][] arrayName; would declare a two-dimensional array.

(True/False)
4.8/5
(28)

In column processing, a two-dimensional array is processed one column at a time.

(True/False)
4.8/5
(39)

Suppose list is a one-dimensional array, wherein each component is of the type int. The following for loop correctly finds the sum of the elements of list.int sum = 0; for (int num : list) sum = sum + num;

(True/False)
4.9/5
(45)

int[] numList = new int[50];for (int i = 0; i < 50; i++) NumList[i]= 2 * i; Num[10] = -20; Num[30] = 8; What is the index number of the last component in the array numList seen in the accompanying figure?

(Multiple Choice)
4.9/5
(32)
Showing 41 - 46 of 46
close modal

Filters

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