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 = 10, c = 15;

    int *arr[ ] = {&a, &b, &c};

    cout << arr[1];

    return 0;

    }

  2. A.
    5
    B.
    10
    C.
    15
    D.
    it will return some random number

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    Array element cannot be address of auto variable. It can be address of static or extern variables.


Be The First To Comment