title: pointer to array as function argument in C
body: <p>I am learning C and I have a problem understanding the difference between an array of integers and a pointer to it. More specifically, </p>
  
  <pre class="lang-c prettyprint-override"><code>int *array;
  int size = atoi(argv[1]);
  array = malloc(sizeof(int)*(size));
  
  int len = read_array_from_file(array, atoi(argv[1]), filename);
  
  merge_sort(array, 0, len-1);
  </code></pre>
  
  <p>what's confusing me is that the definition of the functions are</p>
  
  <pre class="lang-c prettyprint-override"><code>int read_array_from_file(int array[], size_t size, char *filename);
  void merge_sort(int* array, int first, int last);
  </code></pre>
  
  <p>and both work just fine with 'array' as an argument, no error with its type. why is that?</p>