MCQOPTIONS
Saved Bookmarks
| 1. |
What will be the output of the following program? #include<iostream.h> class AreaFinder { float l, b, h; float result; public: AreaFinder(float hh = 0, float ll = 0, float bb = 0) { l = ll; b = bb; h = hh; } void Display(int ll) { if(l = 0) result = 3.14f * h * h; else result = l * b; cout<< result; } }; int main() { AreaFinder objAF(10, 10, 20); objAF.Display(0); return 0; } |
| A. | 0 |
| B. | 314 |
| C. | 314.0000 |
| D. | 200.0000 |
| Answer» B. 314 | |