I came across this code I have no clue what it is doing
// ptr is a pointer to an int
if (2[ptr] == 5){
// do something
}
I did some of my tests but no matter what value I pass into ptr, 0, negatives, positives, 2[ptr]
always evaluates to 0. I am surprised it actually compiles. Can someone explain what this expression is ?