title: Array of arrays, with different sizes
body: <p>I'm having an array, that has arrays in every cell. For example, the big array is called <code>arr</code>:</p>
  
  <pre><code>int a[3] = {3, 2, 1};
  int b[2] = {2, 1};
  int *arr[2] = {a, b}
  </code></pre>
  
  <p>Now the problem is, if I want to print the small arrs, inside the big array.</p>
  
  <p>Here is my code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void printArr(int arr [], int n)
  {
      for (int i = 0 ; i &lt; n ; i++)
      {
          printf("%d ", *(arr + i));
      }
      printf("\n");
  }
  
  int main()
  {
      int a[5] = {1, 8, 4, 2, 0};
      int b[3] = {1, 4, 2};
      int *arr [2] = {a, b};
  
      int n = 0;
  
      for (int i = 0 ; i &lt; 2 ; i++)
      {
          printArr(*(arr + i), n);
      }
  }
  </code></pre>
  
  <p>The output is supposed to be something like this:</p>
  
  <p><code>1 8 4 2 0
  1 4 2</code></p>
  
  <p>But I can't get the size of each array, since <code>sizeof(*(arr + i)</code> gives me 4, which is the size of the pointer (the name of the array), and not all the array it self.
  So what can I do?</p>
  
  <p>Thanks!</p>