160 C++ Programming
Answers
A. True/False
1. True 2. True 3. False 4. True
5. True 6. True 7. False 8. False
9. False 10. True
1.
Length is 3
Breadth is 4
Height is 5
2. Compilation error. Cannot access private
method display() directly through main().
3. Value is 10.
4. Compilation error. Compiler will be confused
about which constructor it should call.
5. 102.5
6. Compilation error. Overloading functions
can be differentiated only based on the
number, type and order of arguments and
not based on the return type.
B. Output of Programs
M03_MOTHXXXX_01_SE_C03.indd Page 160 8/24/11 6:17:50 PM ff-446M03_MOTHXXXX_01_SE_C03.indd Page 160 8/24/11 6:17:50 PM ff-446 /Users/ff-446/Desktop/24:8:2011/Users/ff-446/Desktop/24:8:2011 ...