title: Difference between array of pointers and pointer to array?
body: <pre><code> char string1[3][4]={"koo","kid","kav"}; //This is a 2D array
  
   char  * string[3]={"koo","kid","kav"}; //This is an array of 3 pointers pointing to 1D array as strings are stored as arrays in memory
   char (*string1Ptr)[4]=string1; //This is a pointer to a 1D array of 4 characters
  
  //I want to know differences between string1Ptr(pointer to array mentioned in question) and string(array of pointers mentioned in question). I only typed string1 here to give string1Ptr an address to strings
  </code></pre>
  
  <p>Besides the fact that <code>string</code> can point to strings of any size and <code>string1Ptr</code> can only point to strings of size 4 only(otherwise pointer arithmetic would go wrong), I don't see any differences between them.</p>
  
  <p>For example,</p>
  
  <pre><code>   printf("%s\n", string1[2]);   // All print the same thing, ie, the word "kav"
     printf("%s\n", string1Ptr[2]);
     printf("%s\n", string[2]);
  </code></pre>
  
  <p>They all seem to perform the same pointer arithmetic.(My reason for assuming <code>string</code> and <code>string1Ptr</code> are almost similar besides for the difference I stated above)</p>
  
  <p>So what are the differences between string and string1Ptr? Any reason to use one over the other?</p>
  
  <p>PS: I'm a newbie so please go easy on me.
  Also, I did check <a href="https://stackoverflow.com/q/859634/10701114">C pointer to array/array of pointers disambiguation</a>, it didn't  seem to answer my question.</p>