1.

Which among the following best defines static variables members?(a) Data which is allocated for each object separately(b) Data which is common to all the objects of a class(c) Data which is common to all the classes(d) Data which is common to a specific methodThe question was posed to me at a job interview.I'd like to ask this question from Static Data Members in chapter Exception Handling & Static Class Members of Object Oriented Programming

Answer»

The correct option is (b) Data which is common to all the OBJECTS of a class

Best explanation: The static data members are made common to all the OBJECT of a class. They doesn’t CHANGE from object to object. Those are property of class rather than of any INDIVIDUAL object.



Discussion

No Comment Found

Related InterviewSolutions