Why is the function argument not an array?

why is the function argument an integer pointer instead of an array??

@mehulbhandari358,
Because to access an array all you need is it’s base address. So, the integer pointer, passes as argument, is actually the address of the first integer of array, and all the later elements will be accessible to function by *(a+i) or a[i], where a is the name of array, and i is the index position of element to be accessed.

but why is a pointer used, can’t we do the same thing using an array?

@mehulbhandari358,
They both are the same thing, you can use anything you want. It does not matter.