A static data member is given a value
A. within the class definition
B. outside the class definition
C. when the program is executed
D. never
Answer: Option B
Solution (By Examveda Team)
Static data members in C++ are special variables associated with a class, not individual objects of that class.This means there's only one copy of the static member shared by all objects of the class.
Because of this shared nature, you can't initialize them directly within the class declaration like regular member variables.
Instead, you need to give them a value outside the class definition.
This is done typically by providing an initialization outside the class, often in the same header file or a separate source file.
Therefore, the correct answer is that a static data member is given a value outside the class definition.

no- a static member function can be instantiated within a class or outside the class also