πŸ“Š C++
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
πŸ’¬ Discuss
βœ… Correct Answer: (D) 0.10000000000000001

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
317
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Babita
Publisher
πŸ“ˆ
86%
Success Rate