Q. What is the output of the following C++ code?
Code:
#include <stdio.h>
#include<iostream>
using namespace std;
int main()
{
int x = 5, y = 10, z = 15;
int arr[3] = {&x, &y, &z};
cout << *arr[*arr[1] - 7];
return 0;
}
β
Correct Answer: (D)
Compiler error