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> :: is_exact;
    cout << numeric_limits<double> :: is_exact;
    cout << numeric_limits<long int> :: is_exact;
    cout << numeric_limits<unsigned char> :: is_exact;
    }
    1. 1100
    2. 1001
    3. 0011
    4. Compilation Error
    5. None of these
Correct Option: C

In this program, We are finding whether the types are free of rounding errors by using the function is_exact.



Your comments will be displayed only after manual approval.