Self Review Exercises 7 Flashcards

1
Q

SRE 7

The number that refers to a particular element of an array is called its _____.

a) value
b) size
c) indexed array name
d) index

A

d) index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

SRE 7

The indexed array name of one-dimensional array units’ element 2 is _____.

a) units{2}
b) units(2)
c) units[0,2]
d) units[2]

A

b) units(2)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

SRE 7

An array’s length is ____.

a) one more than the array’s last index
b) one less than the array’s last index
c) the same as the array’s last index
d) returned by method GetUpperBound

A

a) one more than the array’s last index

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

SRE 7

Property ____ specifies the source of the data displayed in a ComboBox.

a) ComboData
b) Source
c) DataList
d) DataSource

A

d) DataSource

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

SRE 7

ComboBox property _____ is 0 when the first ComboBox item is selected.

a) SelectedIndex
b) SelectedValue
c) Index
d) SelectedNumber

A

a) SelectedIndex

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

SRE 7

The process of ordering the elements of an array is called _____ the array.

a) allocating
b) sorting
c) declaring
d) initializing

A

b) sorting

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

SRE 7

Which of the following sorts array averageRainfall?

a) Array(averageRainfall).Sort()
b) Sort.Array(averageRainfall)
c) Sort(averageRainfall)
d) Array.Sort(averageRainfall)

A

d) Array.Sort(averageRainfall)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

SRE 7

Arrays that use two indices are referred to as _____ arrays.

a) single-dimensional
b) two-dimensional
c) double
d) one-dimensional

A

b) two-dimensional

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

SRE 7

The expression ______ creates an Integer array of two rows and five columns.

a) Dim a(2,5) As Integer
b) Dim a(1, 5) As Integer
c) Dim a(1, 4) As Integer
d) Dim a(2, 4) As Integer

A

c) Dim a(1, 4) As Integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

SRE 7

The _____ event is raised when a RadioButton is either selected or deselected.

a) CheckChanged
b) Changed
c) SelectedChanged
d) None of the Above

A

a) CheckChanged

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

SRE 7

When one RadioButton in a container is selected, ______.

a) the others can be selected at the same time
b) a logic error will occur
c) all others will be deselected
d) Both a and b

A

c) all others will be deselected

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

SRE 7

Typically, _____ statements are used to iterate over each element in a two-dimensional array.

a) Do While….Loop
b) nested For….Next
c) Do…Loop Until
d) nested Do…Loop While

A

b) nested For….Next

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

SRE 7

True or False: An array can store many different types of values

A

False: An array can store only values of the same type.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

SRE 7

True or False: An array index normally should be of type Double.

A

False: An array index must be a nonnegative integer or integer expression.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

SRE 7

True or False: Method GetUpperBound returns the highest numbered index in an array

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

SRE 7

True or False: To determine the number of elements in an array, use the NumberOfElements property.

A

False: To determine the number of elements in an array, we can use the Length property.

17
Q

SRE 7

True or False: The linear search works well for unsorted arrays.

A

True