adplus-dvertising
frame-decoration

Question

What is the output of the following program?
    #include <iostream>
    using namespace std;
    class Box
    {
        public :
        double length;
        double breadth;
        double height;
    };
    int main( )
    {
        Box Box1;
        double volume;
        Box1.height = 5;
        Box1.length = 6;
        Box1.breadth = 7.1;
        volume = Box1.height * Box1.length * Box1.breadth;
        cout << "Volume of Box1 : " << volume <<endl;
        return 0;
    }

a.

210

b.

213

c.

215

d.

217

Answer: (b).213

Engage with the Community - Add Your Comment

Confused About the Answer? Ask for Details Here.

Know the Explanation? Add it Here.

Q. What is the output of the following program?