Professional Documents
Culture Documents
Quiz Arrays
Quiz Arrays
and Pointers
Quiz
Time to test your knowledge!
PART I.
IDENTIFICATION: 10 items
IDENTIFICATION: 1 point each
4. To get the array size, the size of the array by the size of the
A scores[0] C scores[2]
scores[1] D scores[3]
B
MULTIPLE CHOICE : 1 point each
A 0 C 4
5 D 6
B
MULTIPLE CHOICE : 1 point each
3. What will the following code display?
int numbers[5] = {99, 87, 66, 55, 101};
for (int i = 1; i < 4; i++) {
cout << numbers[i] << " "; }
A 99 87 66 55 101 C 87 66 55
87 66 55 101 D scores[3]
B
MULTIPLE CHOICE : 1 point each
A size of () C size of []
sizeof() D sizeof[]
B
PART IV.
MISSING CODE : 5 items
MISSING CODE
1. for 2 points
SECRET
MISSING CODE
1. for 3 points
SECRET
SECRET
PeTa Time!
INDIVIDUAL PeTa #1
Create a C++ program that uses a multidimensional array x with 5 rows and 2
columns, and then prints the product of each row's two elements:
DIADS PeTa #2