Home » C++ Programming » Numbers » Question
  1. What is the output of this program?
    #include <iostream>
    #include <limits>
    using namespace std;
    int main ()
    {
    cout << boolalpha;
    cout << numeric_limits<int> :: has_infinity << '\n';
    return 0;
    }
    1. true
    2. false
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: B

In this program, We are checking whether the integer has limit or not by using has_infinity function.



Your comments will be displayed only after manual approval.