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

Float store floating point numbers with 8 place accuracy and requires 4 bytes of Memory. Double has 16 place accuracy having the size of 8 bytes.



Your comments will be displayed only after manual approval.