A

Admin • 833K Points
Coach

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
  • Correct Answer - Option(D)
  • Views: 23
  • Filed under category C++
  • Hashtags:

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.

Be the first to start discuss.