B

Babita • 7.70K Points
Tutor III

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: 193
  • Filed under category C++

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.


Question analytics