Saved Bookmarks
| 1. |
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 doneThe 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 |
|
Answer» The CORRECT choice is (B) Yes, only if the data members are public and are being passed to a function outside the CLASS |
|