Home / CSE MCQs / C++ - MCQs :: Discussion

Discussion :: C++ - MCQs

  1. What is the output of this program?

    #include < iostream >

    using namespace std;

    main()

    {

    double a = 21.09399;

    float b = 10.20;

    int c ,d;

    8.        c = (int) a;

    d = (int) b;

    cout << c <<'t'<< d;

    return 0;

    }

  2. A.
    20 10
    B.
    10 21
    C.
    21 10
    D.
    none of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    In this program, we are casting the operator to integer, So it is printing as 21 and 10


Be The First To Comment