It is because you check sizeof ( int*)
which is sizeof pointer to int. This is because arr passed to function in
int arr [] = {1, 2, 3, 69203};
printArraySize(arr);
decays to a pointer to int. It is just a pointer to integer, first element of array.
C
For doing what you would like to achieve there is a macro often used (for static arrays):
#define ARRAY_SIZE(x) (sizeof((x)) / sizeof((x)[0]))
example:
int arr [] = {1, 2, 3, 69203};
printf( "%d", ARRAY_SIZE(arr));
C++
template
size_t array_size( T(&)[n]) {
return n;
}