Discussion :: C++ - MCQs
-
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;
}
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