Home » C++ Programming » Numbers » Question
  1. What is the output of this program?
     #include <iostream> 
    #include <limits>
    using namespace std;
    int main( )
    {
    cout << numeric_limits<float> :: digits10 << endl;
    cout << numeric_limits<double> :: digits10 << endl;
    float f = 99999999;
    cout.precision ( 10 );
    cout << f << endl;
    }
    1. 100000000
    2. 15
    3. 6
    4. All of above
    5. None of these
Correct Option: A

In this program, We are finding the number of decimal points that the type can represent without loss of precision.



Your comments will be displayed only after manual approval.