What will be the output of the following C++ code?

#include <iostream>
    using namespace std;
    int main()
    {
        int a = 5, b = 10, c = 15;
        int *arr[ ] = {&a, &b, &c};
        cout << arr[1];
        return 0;
    }

a) 5
b) 10
c) 15
d) it will return some random number

1 thought on “What will be the output of the following C++ code?”

Leave a Comment