I am a teaching assistant for a C programming course, and I came across the following line of C code:
char str[] = \"My cat\'s name is Wiggles.\";
printf(\"%
It's a funky syntax for sure, but...
str[5]
would mean *(str+5)
And
5[str]
would mean *(5+str)
Perfectly valid C. From Wikipedia:
Similarly, since the expression a[i] is semantically equivalent to *(a+i), which in turn is equivalent to *(i+a), the expression can also be written as i[a] (although this form is rarely used).
Wacky, but valid.