Saved Bookmarks
| 1. |
Which among the following is true?(a) Two objects can point to the same memory location(b) Two objects can never point to the same memory location(c) Objects not allowed to point at a location already occupied(d) Objects can’t point to any addressThe question was asked in my homework.The query is from Returning Objects in portion Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming |
|
Answer» RIGHT answer is (a) TWO objects can point to the same memory location The best I can EXPLAIN: When an object is created and instead of CALLING a constructor, another object is assigned to it. Both the objects point to the same memory location. This can be illustrated with help of return by reference. |
|