adplus-dvertising
frame-decoration

Question

What is the output of this program?
    #include <iostream>
    using namespace std;
    main()
    {
        double a = 21.09399;
        float b = 10.20;
        int c ,d;
        c = (int) a;
        d = (int) b;
        cout << c <<' '<< d;
        return 0;
    }

a.

20 10

b.

10 21

c.

21 10

d.

none of the mentioned

Answer: (c).21 10

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 this program?