I came across this online and was wondering if someone might be able to explain this or at least give me a name of what it might be so that I can at least know what I'm googling for.
int main()
{
int myarray[4] = {0, 100, 200, 300};
2[myarray] = -999; //why does this work? what is this called?
for ( int i = 0; i < 4; i++)
cout << myarray[i] << endl;
}
The output is 0, 100, -999, 300
I've ran it. I know it works but why? What is this called?