Take a look at the following code:
Code:
char a[10] = "abcdefghi";
printf("%s", a[3]);
printf("%s", 3[a]);
Both the printf's give the same output. Why??
It must be something to do with the way the string is represented in the memory by the C compiler, but what is it?
I would have thought that the offset is multiplied by the size of char, in which case they should give different outputs :/