title: Different way of accessing array elements in C
body: <p>I am a teaching assistant for a C programming course, and I came across the following line of C code:</p>
  
  <pre><code>char str[] = "My cat's name is Wiggles.";
  printf("%c %c %c %c\n", str[5], *(str + 5), *(5 + str), 5[str]);
  </code></pre>
  
  <p>I never came across the very last argument (<code>5[str]</code>) before, and neither did my professor. I don't think it's mentioned in K&amp;R and C Primer Plus. I found this piece of code in a set of technical interview questions. Does anyone know why C allows you to access an array element that way also? I never heard of an index being outside the set of brackets and the name of an array inside the brackets.</p>
  
  <p>Your help will be greatly appreciated!</p>