Class and Objects Answers
Class and Objects Answers
2. Class cls
_____
name specifies the types and scope of its members.
7. An object is an _______of
variable a class.
11. Local classes can use any global variable but with ____
::(scope resolution)
____
13. friendfunction and friend
___ classes breaks the rules of the data
hiding in C++.
14. Keyword friend is used in function declaration
____ but not in
function____
defination
15. friendship are______
mechanism that allows a class to grant access to its private and
protected members to specific functions or other classes.
_____
16. bit allows users to reserve the exact amount of bits
set
required for storage of values.
______ operator
17.&(address) cannot be applied to bit -field components.
7. All the member functions defined outside the class are inline x
11. Static and non static member functions in the same class
which same names and same number and types of the
arguments is possible. X
10. Static variables are associated with the class itself rather than
with any class object, they are also known as…………….
A) class variables
B) object variables
C) function variables
D) internal variables
18. If a member function does not alter any data in the class, that
may be declared as ………………..
A) constant member function
B) private member function
C) static member function
D) friend function