InterviewSolution
Saved Bookmarks
| 1. |
Downcasting ____________________(a) Can result in unexpected results(b) Can’t result in unexpected result(c) Can result only in out of memory error(d) Can’t result in any errorI have been asked this question during an interview for a job.The query is from Downcasting topic in portion Default Arguments vs Overloading, Upcasting and Downcasting of Object Oriented Programming |
|
Answer» RIGHT OPTION is (a) Can result in unexpected results To explain: The result of downcasting can be unexpected. This is because downcasting is done on the objects into the objects which doesn’t CONTAIN any information of DATA in lateral object. |
|