There is still a difference
Although most of the time they can be used with each other, the biggest difference is that the pointer can be changed, you can change the value pointing to the content through the pointer, but the array name is not
For example: (as parameters respectively)
Int num [10], * P;
P = num; // P points to the first element of the array.
Call two functions in the main function
1 sum (Num );
2 sum (p + 2, 10 );
This is different because the address at the beginning of the num array cannot be changed, but P points to the third element of the array, and the 10 at the end can also be changed.When using a pointer as a form parameter, we need to include an int n to indicate the number of data to be processed.So using a pointer as a form parameter will give you an illusion that it is indeed an element of the array to which it points (it depends on the movement of your pointer, such as P + 2, etc, array names cannot be moved), but it is just a pointer. You can use sizeof (Num) and sizeof (p) to evaluate their values in the called function, I know why I always add an int.
N, because if n is not added, the function does not know the number of the numbers you want to operate. In addition, do not forget to pass the array and pass the General int, double, and other types,If an array is passed, the original array (problematic) is passed, and the function operation changes the original array, while the passing of a general number is only a copy of it, which has no effect on the original number.;