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 a = 5, b = 6, c, d;

    c = a, b;

    d = (a, b);

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

    return 0;

    }


  2. A.
    5 6
    B.
    6 5
    C.
    6 7
    D.
    none of the mentioned

    View Answer

    Workspace

    Answer : Option A

    Explanation :

    It is a separtor here.In c,the value a is stored in c and in d the value b is stored in d because of the bracket.


Be The First To Comment