I am learning C and I have a problem understanding the difference between an array of integers and a pointer to it. More specifically,
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);
what's confusing me is that the definition of the functions are
int read_array_from_file(int array[], size_t size, char *filename);
void merge_sort(int* array, int first, int last);
and both work just fine with 'array' as an argument, no error with its type. why is that?