ISRO Computer Science (CSE) 2014 - Question 39

All ISRO Computer Science (CSE) papers | ISRO Computer Science (CSE) 2014

If only one memory location is to be reserved for a class variable, no matter how many objects are instantiated, then the variable should be declared as

  • A. extern
  • B. static
  • C. volatile
  • D. const

Answer: B. static

Explanation: Static variables are shared among all instances of a class.

| | All questions of ISRO Computer Science (CSE) 2014