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

Discussion :: C++ - MCQs

  1. What is the output of this program?


    #include < iostream >

    using namespace std;

    int main () 

    int n; 

    n = 43;

    cout << hex << n << endl;

    return 0;

    }

  2. A.
    2c
    B.
    2b
    C.
    20
    D.
    50

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    In this program, We are printing the hexadecimal value of the given decimal number by using hex function.


Be The First To Comment