1.

How members of an object are accessed?(a) Using dot operator/period symbol(b) Using scope resolution operator(c) Using member names directly(d) Using pointer onlyThis question was posed to me by my school teacher while I was bunking the class.This key question is from Objects topic in portion OOPs Concept & Features of Object Oriented Programming

Answer»

Right option is (a) Using dot OPERATOR/period symbol

Explanation: Using dot operator after the NAME of object we can access its MEMBERS. It is not necessary to use the pointers. We can’t use the names directly because it may be USED outside the class.



Discussion

No Comment Found

Related InterviewSolutions