Multiple Choice Answers

1. Which of the following best describes what the private scope means:
a. Private class members are private withn the scope of that file.
b. Each object’s private data is directly inaccessible to other objects.
c. Each object’s private data is directly inaccessible to other objects of a different type. But is accessible to other objects of the same time.
d. Private data is stored safely on the heap, where no other programs or users can access it.

2. How many times will the statement “here” print to the screen?
for (int i = 0; i < 100; i++) {

for (int j = 1; j < 50; j++) {

for (int k = 25; k < 40; k++) {

cout << “here\n”;
}
}
}

3. How many bytes of memory are allocated for the following two dimensional array:
float arr[8][8];

4.  What is the maximum value of an unsigned char?

5. What will int x = 5/8 * 8 + 16 evaluate to?
a. 21
b. 15
c. 16
d. 0