Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by whitelisting our website.

Cpp Programming Quiz 158 – What will be the output of the following program?

Question: What will be the output of the following program?

#include
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: Option A