title: To merge n number of arrays into one using functions and pointers in C
body: <p>i have tried doing it with functions and arrays but have failed in-order to do it with pointers.
  I want to do it with the help of pointers instead of arrays, but i am having problem with passing and calling the values of arrays using pointers.
  below is the code.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  void final_array(int arr[], int size);
  void array(int arr[], int i, int size);
  
  int main()
  {
  int num, size[100];
  int i, j;
  int arr[100][100];
  
  printf("Enter the number of arrays: \t");
  scanf("%d", &amp;num);
  num = num &lt; 100 ? num: 100;
  
  //feeding elements.
  
  for (i = 0; i&lt;num; i++)
  {
      printf("\nEnter the size of the array: \t");
      scanf("%d", &amp;size[i]);
  
      printf("\nEnter the array: ");
  
      size[i] = size[i] &lt; 100 ? size[i] : 100;
      array(&amp;arr[i][0], i, size[i]);
  }
  
  for(i=0; i&lt;num; i++)
  {
      final_array(&amp;arr[i][0], size[i]);
      printf("\n");
  }
  
  printf("\nPress Enter key to exit.\n");
  getchar();
  
   return 0;
  }
  
  void array(int arr[], int i, int size)
  {
      int j;
  for (j = 0; j&lt;size; j++)
  {
      printf("\nEnter arr[%d][%d]: \t",i, j);
      scanf("%d", &amp;arr[j]);
  }
  }
  
  void final_array(int arr[], int size)
  {
      int j;
      for(j=0; j&lt;size; j++)
      {
          printf("%d\t", arr[j]);
      }
  }
  </code></pre>