MCQ
When there is a need to have some variable that is shared by all object instances of the same class, the variable should be allocated memory only once per class. What is known as these types of variables?
  • A
    class variable
  • B
    static variable
  • a and b both
  • D
    None of these

Answer

Correct option: C.
a and b both
a and b both

Need a full question paper?

Generate a complete, print-ready paper with questions like this in minutes — across 16+ boards, with answer keys.

Start Generating Free