title: Accessing 2D array elements using pointer arithmetic in C
body: <p>I have this code in which I've been trying to figure out a doubt on pointer,array combination.</p>
  
  <pre><code>int main()
  {
    int s[4][2] = {
      {1234,56},
      {1212,13},
      {1434,80},
      {1312,78}
    };
    printf("%d\n",s[2]);
    printf("%d\n",*s[2]);
    printf("%d\n",s+2);
    printf("%d\n",*(s+2));
    return 0;
  }
  </code></pre>
  
  <p><strong>And the doubt is:</strong>
             Even though s[2] and (s+2) refer to the same address, why does *(s[2]) prints the value (i.e., 1434 ) but *(s+2) prints the same address what (s+2) has printed. Isn't *(s+2) mean value at address of 3rd 1D array(i.e., s[2][0])?</p>