Static member shares copies between objects in a class - Single copy of the static member
Q. C++: If you have declared a static member in a class, then how many copies of static member are shared between objects?- Published on 22 Jun 15a. Separate copy of the static member is created for all objects of the class.
b. Single copy of the static member is shared by all objects of the class.
c. Only static function are shared between objects not variable.
d. None of the above.
ANSWER: Single copy of the static member is shared by all objects of the class.