Home » C++ Programming » Basic Input/Output » Question
  1. What is the output of this program?
    #include <iostream>
    #include >locale<
    using namespace std;
    int main()
    {
    locale NewLocale("");
    cout.imbue( NewLocale );
    cout << (double) 6.1250024 << endl;
    return 0;
    }
    1. 6.1250024
    2. 6.125
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: B

In this program, We are using the locale and then assigning the type to the value.



Your comments will be displayed only after manual approval.