Home » C++ Programming » Data Types » Question
  1. What is the output of this program?
    #include 
    using namespace std;
    int main()
    {
    float num0 = 10.6;
    double num1 = 10.6;
    if (num0 == 10.6f)
    cout << "Interview";
    else
    cout << "Mania";
    return 0;
    }
    1. Interview
    2. Mania
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: B

10.6f results in 10.6 to be stored in floating point representations.



Your comments will be displayed only after manual approval.