Quiz #4 – Structured Data

Started: Nov 27 at 12:31am

Quiz Instructions

This quiz consists of 10 questions both T/F and multiple choice, and they are each worth 10 points. There are two attempts available and the quiz is open for an hour. Good luck!

Note: this is a timed quiz. You may check the remaining time you have at any point while taking the quiz by pressing the keyboard combination SHIFT, ALT, and T… Again: SHIFT, ALT, and T…
?

Question 110?pts

Look at the following statement.

 

???? bookList[2].publisher[3] = ‘t’;

 

This statement ________.

?
?
?

Question 210?pts

Passing a structure as a constant reference parameter to a function ________.

?
?
?

Question 310?pts

Members of a(n) ________ union have names, but the union itself has no name.

?
?
?

Question 410?pts

If Circle is a structure, the statement:

 

??????????????? Circle *pcirc = nullptr;

?
?
?

Question 510?pts

If a is a structure variable and p, a pointer, is a member of the structure, what will the following statement do?

 

???? cout << *a.p;

 

?
?
?

Question 610?pts

Look at the following declaration.

 

???? enum Tree { OAK, MAPLE, PINE };

In memory, what value will the MAPLE enumerator be stored as?

?
?
?

Question 710?pts

In C++ 11 you can use a new type of enum, known as a(n) ________, (also known as an enum class) to have multiple enumerators with the same name, within the same scope.

?
?
?

Question 810?pts

True/False:? You cannot directly assign an integer value to an enum variable.

?
?
?

Question 910?pts

True/False:? When you use a strongly typed enumerator in C++ 11, you must prefix the enumerator with the name of the enum, followed by the :: operator.

?
?
?

Question 1010?pts

True/False:? The expression *s->p; indicates that s is a structure pointer and p, which is also a pointer, is a member of the structure pointed to by s.

?