English

State Three Characteristics of Static Data. - Computer Science 1

Advertisements
Advertisements

Question

State three characteristics of Static Data.

Short Note

Solution

The special characteristics of a static data member in a class are as follows:
(1) It is initialized to zero when the first object of its class is created. No other initialization is permitted.
(2) 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.
(3) It is visible only within the class, but its life time is the entire program.
(4) Static members of a class are not specific to an instance of this class.
(5) The class constructor does not initialize static variables.
(6) Thus, Instead of object, with the help of the class the static members are called

shaalaa.com
C++ Programming
  Is there an error in this question or solution?
2015-2016 (March)

APPEARS IN

Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×