Exercise – Lecture 05
[A] State whether the following statements are True or False:
(a) Static data members are shared amongst multiple objects.
(b) Static member functions can access only static data members.
(c) Static data member must be declared inside the class but defined
outside it.
(d) Static member function can be accessed using the syntax
classname::functionname( ).
[B] Answer the following:
(a) When will you make a data member of a class as static?
(b) When will you want to make class Sample friend of an Example
class?
(c) When will you make function fun( ) friend of a class Sample?
(d) Implement += and -= operator functions in Complex class.
(e) Implement + operator function to add two 3 x 3 matrices.