Home » C++ Programming » Data Types » Question
  1. What is the output of the following program?
    #include 
    using namespace std;
    int main()
    {
    float n = 143.0f;
    cout << n << endl;
    return 0;
    }
    1. 143.0f
    2. Compilation Error
    3. Runtime Error
    4. 143
    5. None of these
Correct Option: D

The value 143 is printed because of its precision.



Your comments will be displayed only after manual approval.