8
What will be the output of the program?
#include <iostream>
using namespace std;
struct A {
int d[3] = {7, 8, 9};
int &operator[](int i) { return d[i]; }
};
int main() {
A a;
a[1] = 50;
cout << a[0] + a[1] << endl;
return 0;
}Medium