Advertisements
Advertisements
Question
Explain in short the three special characteristic of a static data member in a class.
Explain
Advertisements
Solution
The three special characteristics of a static data member in a class are as follows:
- It is initialized to zero when the first object of its class is created. No other initialization is permitted.
- Only one copy of that member is created for the entire class and is shared by all the objects of that class, no matter how many objects are created.
- It is visible only within the class, but its lifetime is the entire program.
shaalaa.com
Is there an error in this question or solution?
