
340 Classes and Objects
EXERCISES
(A) Answer the following questions
(1) Explain class and struct with
their differences.
(2) Which operators are used to access
members?
(3) Explain the uses of private and
public keywords. How are they dif-
ferent from each other?
(4) Explain the features of a member func-
tion.
(5) What are static member variables
and functions?
(6) How are static variables initialized?
Explain with a statement.
(7) What are friend functions and
friend classes?
(8) How are static functions and friend
functions invoked?
(9) What do you mean by constant
function?
(10) What are local classes? ...