Complete Solutions
The amount of memory used by an array depends on the array's data type and the number of
elements in the array. True
An array initialization must be all on one line. False
The name of an array stores the _____ of the first array element. memory address
An array can store a group of values, but the values must be the same data type
If a variable uses more than one byte of memory, for pointer purposes its address is the
address of the first byte of storage
A(n) ________ can be used to specify the starting values of an array. initialization list
To access an array element, use the array name and the element's ________. subscript
, CSCI 1943 - BRCC Questions With
Complete Solutions
True/False: An individual array element can be processed like any other type of C++ variable.
True
What is the output after the following code executes?
int numerator = 5;
int denominator = 25;
int temp = 0;
temp = numerator;
numerator = denominator;
denominator = temp;
cout << numerator << "/" << denominator << " = " << (numerator/denominator) << endl;
25/5 = 5
The following is the pseudocode for which type of algorithm?
For maxElement = each subscript in the array, from the last to the first
For index = 0 To maxElement - 1
If array[index] > array[index + 1]
, CSCI 1943 - BRCC Questions With
Complete Solutions
swap array[index] with array[index +1]
End If
End For
End For bubble sort
In C++11, the ________ keyword was introduced to represent address 0. nullptr
True/False: In C++ 11, you can use smart pointers to dynamically allocate memory and not
worry about deleting the memory when you are finished using it. True
To use the strlen function in a program you must include #include<cstring>
The escape sequence that represents the null terminator is \0
True/False: If an uppercase character is passed as an argument to toupper, the result will be an
uppercase character. True