Can data members be passed to a function using the object?
(a) Yes, it can be passed only inside class functions
(b) Yes, only if the data members are public and are being passed to a function outside the class
(c) No, can’t be passed outside the class
(d) No, can’t be done
The question was posed to me in final exam.
This intriguing question originated from Passing Object to Functions in division Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming