The correct answer is: A. within the class definition.
A static data member is a member of a class that is shared by all objects of that class. It is declared with the keyword static. Static data members are initialized once, when the class is first loaded into memory. They can be accessed using the class name, followed by the dot operator, followed by the
For example, the following code defines a class with a static data member:
“`class MyClass {
public:
Join Our Telegram Channel