Home / Programming MCQs / C++ MCQs / Question

Q. What will be the output of the following C++ program?

Code:
        #include <iomanip>
        #include <iostream>
        using namespace std;
        int main()
        {
            cout << setprecision(17);
            double d = 0.1;
            cout << d << endl;
            return 0;
        }
(A) 0.100001
(B) compile time error
(C) 0.11
(D) 0.10000000000000001

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.