Quiz 5 Flashcards
A ;
(semicolon) is required after the closing brace of a class declaration. True or false?
True.
Procedural programming centers on objects and the procedures (methods) that interact with them. True or false?
False.
An instance of a class
(object) may be passed to a function as an argument. True or false?
True.
The standard library string (std::string
) is a class. True or false?
True.
A class is a primitive datatype. True or false?
False
classes are defined by the user, so they are not primitive
Constructors are not required to have the same name as the class. True or false?
False.
Private members must be declared before public members in a class. True or false?
False
Constructors may be overloaded. True or false?
True.
Members of a class
are private by default. True or false?
True
members of a struct
are public by default
Members of a Struct are private by default. True or false?
False
members of a struct
are public by default
A function may return an instance of a class
(object). True or false?
True.
If the default constructor is forgotten, and no other constructors are defined, then the compiler will add a default constructor for you. True or false?
True
Object-oriented programming is centered on the procedures/actions that take place in a program instead of objects that encapsulate data and functions together. True or false?
False.
Structures pass by reference by default. True or false?
False
A class object may be a member of another class. True or false?
True.