1.

Which among the following is not a use of object?(a) Defining a member function(b) Accessing data members(c) Creating instance of a class(d) Using class membersThis question was posed to me in a job interview.The doubt is from Object Use topic in section Object of Object Oriented Programming

Answer» CORRECT option is (a) DEFINING a member function

Best explanation: The objects can’t be used to define any member function. Member functions MUST be defined by the CLASS only. Objects can only ACCESS the members and use them.


Discussion

No Comment Found

Related InterviewSolutions