First of all this expression
sizeof(A)/sizeof(A[0]) - 1
is invalid relative to the calculation of the size of an array
/There must be
sizeof(A)/sizeof(A[0])
Moreover the type of the expression is size_t
So instead of
int size =sizeof(A)/sizeof(A[0]);
it would be better to define size as having type size_t
size_t size =sizeof(A)/sizeof(A[0]);
As for pointers then they do not keep information whether they point only one separate object or point the first object of some sequence including arrays. So usually functions that accept pointers as arguments also define the second parameter that specifies the number of elements that belong to the sequence the first element of which the pointer refers to.
So your function should be declared as
void funct(int *p, size_t n);
The exclusion is character arrays that stores strings. In this case you can determine how many characters in a string stored in the array by using standard function std::strlen
However this value differs from the size of the array.