COP 3330 EXAM 1 OBJECT-ORIENTED
PROGRAMMING COMPREHENSIVE STUDY
GUIDE 2026
◉ There is no aggregate initialization available for structure
variables. You must declare structure variables then use assignment
to initialize the members.
True or False.
Answer: False
◉ A structure can have a member whose type is another structure.
True or False.
Answer: True
◉ A data type is a collection of a set of values together with a set of
basic operations defined on the values.
True or False.
Answer: True
◉ If, in a class, one uses the keyword public:, it affects only the
member that immediately follows the keyword public, making this
member accessible to any other function defined anywhere.
,True or False.
Answer: False
◉ A member of a structure or of a class is accessed using the
a. comma operator
b. dot operator
c. indexing operator
d. ampersand operator.
Answer: b. dot operator
◉ There may be more than one correct answer. C++ allows the
programmer to deal with data at a higher level of abstraction in part
because related data of differing types can be treated as a unit in
a. an array variable
b. a function
c. a structure variable
d. a class variable.
Answer: c. a structure variable
d. a class variable
◉ There may be more than one correct answer. When you define a
C++ class so that the result is an ADT, which of the following remarks
, about whether to make a member variable or function public or
private are correct?
a. Don't make member variables public.
b. Make them all public. It simplifies life and makes things more
efficient to be able access members anywhere.
c. Make all member functions public.
d. There are some member functions that shouldn't be public, but
most should be public..
Answer: a. Don't make member variables public
d. There are some member functions that shouldn't be public, but
most should be public.
◉ The following definition of the structure variables of type
myStruct s and t could be made using several definitions using the
structure tag.
struct myStruct
{
int i;
double d;
} s, t;
True or False.
Answer: True
PROGRAMMING COMPREHENSIVE STUDY
GUIDE 2026
◉ There is no aggregate initialization available for structure
variables. You must declare structure variables then use assignment
to initialize the members.
True or False.
Answer: False
◉ A structure can have a member whose type is another structure.
True or False.
Answer: True
◉ A data type is a collection of a set of values together with a set of
basic operations defined on the values.
True or False.
Answer: True
◉ If, in a class, one uses the keyword public:, it affects only the
member that immediately follows the keyword public, making this
member accessible to any other function defined anywhere.
,True or False.
Answer: False
◉ A member of a structure or of a class is accessed using the
a. comma operator
b. dot operator
c. indexing operator
d. ampersand operator.
Answer: b. dot operator
◉ There may be more than one correct answer. C++ allows the
programmer to deal with data at a higher level of abstraction in part
because related data of differing types can be treated as a unit in
a. an array variable
b. a function
c. a structure variable
d. a class variable.
Answer: c. a structure variable
d. a class variable
◉ There may be more than one correct answer. When you define a
C++ class so that the result is an ADT, which of the following remarks
, about whether to make a member variable or function public or
private are correct?
a. Don't make member variables public.
b. Make them all public. It simplifies life and makes things more
efficient to be able access members anywhere.
c. Make all member functions public.
d. There are some member functions that shouldn't be public, but
most should be public..
Answer: a. Don't make member variables public
d. There are some member functions that shouldn't be public, but
most should be public.
◉ The following definition of the structure variables of type
myStruct s and t could be made using several definitions using the
structure tag.
struct myStruct
{
int i;
double d;
} s, t;
True or False.
Answer: True