InterviewSolution
Saved Bookmarks
| 1. |
Will The Following Two Functions Be Overloaded By The Compiler, Or Will The Compiler Flag It As An Error? Why? Void Test( Int X, Double Y); & Int Test( Int A, Double B). |
|
Answer» The COMPILER will flag this as a redeclaration error because neither return types nor ARGUMENT names are considered when determining unique signatures for OVERLOADING functions. Only number and TYPE of ARGUMENTS are considered. The compiler will flag this as a redeclaration error because neither return types nor argument names are considered when determining unique signatures for overloading functions. Only number and type of arguments are considered. |
|