Object Oriented Programming20795 marksStatic data members and static functions
What is the task of static data members and function? Illustrate with an example.
What is the task of static data members and function? Illustrate with an example. [5]
A static data member is a class variable that is shared among all objects of that class. Unlike regular data members (which have separate copies for each object), only one copy of a static data member exists, regardless of how many objects are created. Key characteristics: - Declared with the key...