Saved Bookmarks
| 1. |
We can assign ______________________(a) Value of one reference variable to another(b) Value of any object to another(c) Value of any type to any object(d) Value of non – reference to another referenceThe question was asked in a job interview.Origin of the question is Assigning Objects in section Assigning Object, Pointer to Objects, Passing and Returning Object of Object Oriented Programming |
|
Answer» RIGHT answer is (a) VALUE of ONE reference variable to ANOTHER The best I can explain: Only the reference value can be assigned to another reference value. This is because both deal with the address. There is no TYPE mismatch hence we can assign them. |
|