CPlusOOP
SiteMap
Building C++ Classes
Programming C++
C++ Class Construct
«Prev
Next»
Building C++ Classes
C++ Prerequisites
C++ Requirements
C++ Expectations
Different CPlus Compilers
OOP Encapsulation
OO Programming
Type Extensibility
Encapsulation Packing Data
C++ Class Concept
Object Class Concept
Declare Member Function
Using Member Function
Private Public Access
ADT Interface
Black Box Principle
Design C++ Class
OOP Conclusion
OOP Encapsulation - Quiz
C++ Class Constructs
Scope Resolution Operator
Unary Form Scope Resolution
Binary Scope Resolution
Orthogonal Class Design
Overloading Member Functions
External Member Functions
Constructor Functions
Variable Memory Allocation
Constructor Functions
Destructor Functions
Constructor Destructor
Initialization Constructor
Constructor Object Declaration
Default Constructor
Constructor Initializer List
Constructors As Conversions
C++ Constructor Function
Cplus Constructor - Quiz
Dynamic Stack
Dynamically sized Stack
Stack Constructors
Copy Constructors
Designing Copy Constructor
C++ Destructor Usage
Construct Dynamically Sized Stack
Dynamic Structures
C++ Class Internals - Quiz
Each question is worth one point. Please select the correct answer.
1.
The expression
cout << ::i
means:
Please select the best answer.
A.
print the global variable
i
B.
print the local variable
i
C.
print the value of
i
in the nearest enclosing scope
D.
none of these
2.
An
int i
is a static data member of class
X
if which condition is met:
Please select the best answer.
A.
it is declared
static
within the class
B.
it is shared by all variables of that class
C.
it is accessible as
X::i
D.
all of the above
3.
If class
IN
is declared in class
OUT
and
int i
is in
IN
, how would you reference
i
unambiguously?
Please select the best answer.
A.
IN::OUT::i
B.
OUT::i
C.
OUT::IN::i
D.
::i
4.
The
this
pointer:
Please select the best answer.
A.
is
const
and therefore cannot have its value altered
B.
is available for native types
C.
is mutable and can have its value altered
D.
must be explicitly declared in a class
5.
A
static
member function:
Please select the best answer.
A.
does not have access to
this
pointer arguments
B.
must be public
C.
is a class variable
C.
none of the above
Correct answers:
Your Score: 0
Submit
Quiz Explanation