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

Discussion :: C++ - MCQs

  1. What is the output of this program?

    #include < iostream >

    using namespace std;

    #define MAX 10

    int main()

    {

    int num;

    num = ++MAX;

    cout << num;

    return 0;

    }

  2. A.
    11
    B.
    10
    C.
    compile time error
    D.
    none of the mentioned

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    Macro Preprocessor only replaces occurance of macro symbol with macro symbol value, So we can't increment the value.


Be The First To Comment