what does this mean? 2[a] = ‘b’;


I bet this will surprise you as long as you are not aware of this.

void GeneralTest()
{
    char a[4] = {'a', 'b', 'c', 0};
    2[a] = 'b';            //same as a[2] = 'b';
}

I learnt it from http://www.xdf.me/?p=148

Advertisements
Comments are closed.
%d bloggers like this: