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

Discussion :: C++ - MCQs

  1. What is the output of this program?

    #include < stdio.h >

    using namespace std;

    int main()

    {

    char str[5] = "ABC";

    cout << str[3];

    cout << str;

    return 0;

    }

  2. A.
    ABC
    B.
    ABCD
    C.
    AB
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    We are just printing the values of first 3 values.


Be The First To Comment