title: Can I use pointer to print out arrays of int array just like arrays of string?
body: <p>If I want to print out array of string like:</p>
  
  <pre><code>char juices_A[][12] = { "dragonfruit", "waterberry", "sharonfruit", };
  </code></pre>
  
  <p>I can simply use <code>juices_A[0]</code>,<code>juices_A[1]</code>,<code>juices_A[3]</code>, respectively as a pointer to string <code>"dragonfruit"</code>, <code>"waterberry"</code>, <code>"sharonfruit"</code>, and print them out.</p>
  
  <p>But what if I want to print out array of int array like:</p>
  
  <pre><code>int data[3][3] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
  </code></pre>
  
  <p>I can not simply use <code>data[0]</code>,<code>data[1]</code>,<code>data[2]</code> as pointer to <code>{ 1, 2, 3 }</code>, <code>{ 4, 5, 6 }</code>, <code>{ 7, 8, 9 }</code>, I need to adopt a more complicated way to print them out. I need to use loop inside loop. So I want to know why I can not use pointer in the int situation? I read on book "<strong>Array variables are like pointers..</strong>" so I assume int array variable <code>data[0],data[1],data[2]</code> are also like pointers...</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
  
      int i_A = 0;
      char juices_A[][12] = { "dragonfruit", "waterberry", "sharonfruit", };
      for (; i_A &lt; 3; i_A++)
          printf("%s;", juices_A[i_A]);
      puts("");
  
      int i_B = 0;
      int data[3][3] = { { 1, 2, 3 }, { 4, 5, 6 }, { 7, 8, 9 } };
      for (; i_B &lt; 3; i_B++) {
          int i_C = 0;
          for (; i_C &lt; 3; i_C++)
              printf("%i,", data[i_B][i_C]);
          printf(";");
      }
  
      return 0;
  }
  </code></pre>
  
  <p>the result is:</p>
  
  <pre><code>dragonfruit;waterberry;sharonfruit;
  1,2,3,;4,5,6,;7,8,9,;
  </code></pre>