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

Discussion :: C++ - MCQs

  1. What is the output of this program?

    #include

    using namespace std;

    int main()

    {

    int a;

    a = 5 + 3 * 5;

    cout << a;

    return 0;

    }

  2. A.
    35
    B.
    20
    C.
    25
    D.
    30

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Because the * operator is having highest precedence, So it is executed first and then the + operator will be executed.


Be The First To Comment