adplus-dvertising
frame-decoration

Question

Can pointers to object access the private members of the class?

a.

Yes, always

b.

Yes, only if it is only pointer to object

c.

No, because objects can be referenced from another objects too

d.

No, never

Answer: (d).No, never

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. Can pointers to object access the private members of the class?

Similar Questions

Discover Related MCQs

Q. Is name of an array of objects is also a pointer to object?

Q. Which is the correct syntax to call a member function using pointer?

Q. If pointer to an object is created and the object gets deleted without using the pointer:

Q. How can the address stored in the pointer be retrieved?

Q. What should be done to prevent changes that may be made to the values pointed by the pointer?

Q. References to object are same as pointers of object.

Q. Which is the pointer which denotes the object calling the member function?

Q. Which among the following is true ?

Q. The this pointer is accessible __________________

Q. An object’s this pointer _____________________

Q. The result of sizeof() function __________________

Q. Whenever non-static member functions are called _______________

Q. Which is the correct interpretation of the member function call from an object, object.function(parameter);

Q. The address of the object _________________

Q. Which syntax doesn’t execute/is false when executed?

Q. The this pointers _____________________

Q. Earlier implementations of C++ ___________________

Q. This pointer can be used directly to ___________

Q. Which among the following is/are type(s) of this pointer?

Q. Which is the correct syntax for declaring type of this in a member function?