NEW
Font size
WorksheetsCSNP-04103 Chapter 8 - NB - Arrays
Total questions: 10
Worksheet time: 5mins
How many different data types can a single C++ array have?.
Two
One
Infinite
Depends
How do you reference individual members of an array?.
By the name
By the number of elements
By the subscript
By the value of the array
What is the subscript number for the first element of an array?
0
1
n-1
1-n
Arrays are stored in:
Hard drive
External files
Consecutive memory locations
a random memory location
Are there any limitations for the data types that can be used in an array?.
No
Yes
A subscript can be only:
A Float
An Integer
An Integer or Integer expression
A long long double
The last subscript of an array is:
n
n-1
long integer
float
What is the size of the following array: int years [ ] = {2000,1999,1998,1997};
0
{2000,1999,1998,1997}
3
4
What is the result of the following commands:
string name = "Simon Bolivar";
cout << name[6];
space
B
S
o
How many dimensions can an array have?.
One
Two
Infinity, but it can get complicated after two
No more than three
