Question
a.
Dot operator
b.
Arrow operator
c.
Dot or arrow as required
d.
Dot, arrow or direct call
Posted under Object Oriented Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. How to access data members of a class?
Similar Questions
Discover Related MCQs
Q. To create a pointer to a private data member of a class, outside the class, which among the following is correct?
View solution
Q. Which among the following is true for use of setter() and getter() function?
View solution
Q. The static member functions can only use ________
View solution
Q. A class can have self-referential data members.
View solution
Q. What is the keyword used to make data members have same value?
View solution
Q. Which data members can be inherited but are private to a class?
View solution
Q. The arguments passed to member functions by reference are considered as data members of class.
View solution
Q. Which among the following is not allowed for data member declaration?
View solution
Q. Which among the following best describes member functions?
View solution
Q. How many types of member functions are generally there in C++?
View solution
Q. How can a static member function be called in main function?
View solution
Q. What are inline member functions?
View solution
Q. What happens if non static members are used in static member function?
View solution
Q. Static member functions _____________
View solution
Q. How to access members of the class inside a member function?
View solution
Q. For overloading “( )”, “[ ]” or “->” operators, a class __________
View solution
Q. If a virtual member function is defined, ___________
View solution
Q. Member functions of a generic class are _____________
View solution
Q. Member function of a class can ____________
View solution
Q. A member function can _______________ of the same class
View solution
Suggested Topics
Are you eager to expand your knowledge beyond Object Oriented Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!