Advertisements
Advertisements
प्रश्न
Explain in short the three special characteristic of a static data member in a class.
स्पष्ट कीजिए
Advertisements
उत्तर
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
क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
