Filters
Question type

Study Flashcards

Assume array1 and array2 are the names of arrays. To assign the contents of array2 to array1, you would use the following statement. array1 = array2;

Correct Answer

verifed

verified

Which of the following is a valid C++ array definition?


A) int array[0];
B) float $payments[10];
C) void numbers[5];
D) int array[10];
E) None of these

Correct Answer

verifed

verified

To pass an array as an argument to a function, pass the _________ of the array.


A) contents
B) size, expressed as an integer
C) name
D) value of the first element
E) None of these

Correct Answer

verifed

verified

By using the same ________ you can build relationships between data stored in two or more arrays.


A) array name
B) data
C) subscript
D) arguments
E) None of these

Correct Answer

verifed

verified

An array's size declarator must be a(n) _________ with a value greater than _________.


A) number, one
B) number, zero
C) constant integer expression, zero
D) variable, -1
E) None of these

Correct Answer

verifed

verified

The ______________ is automatically appended to a character array when it is initialized with a string constant.


A) array name
B) number of elements
C) value of the first element
D) null terminator
E) None of these

Correct Answer

verifed

verified

Which statement correctly defines a vector object for holding integers?


A) vector v<int>;
B) int vector v;
C) int<vector> v;
D) vector<int> v;

Correct Answer

verifed

verified

Although two-dimensional arrays are a novel idea, there is no known way to pass one to a function.

Correct Answer

verifed

verified

If an array is partially initialized, the uninitialized elements will be set to zero.

Correct Answer

verifed

verified

It is __________ to pass an argument to a function that contains an individual array element, such as numbers[3].


A) illegal in C++
B) legal in C++
C) not recommended by the ANSI committee
D) not good programming practice
E) None of these

Correct Answer

verifed

verified

An array with no elements is


A) legal in C++
B) illegal in C++
C) automatically furnished one element, with a value of zero
D) automatically furnished one value -- the null terminator
E) None of these

Correct Answer

verifed

verified

A two-dimensional array can have elements of _________ data type(s) .


A) one
B) two
C) four
D) Any of these
E) None of these

Correct Answer

verifed

verified

A two-dimensional array can be viewed as ___________ and _____________.


A) rows, columns
B) arguments, parameters
C) increments, decrements
D) All of these
E) None of these

Correct Answer

verifed

verified

Showing 41 - 53 of 53

Related Exams

Show Answer