Pointers are always of fixed size and the OP is using pointer. For sizeof() to return the actual length of an array, you have to declare an array and pass it's name to sizeof().
int arr[100];
sizeof(arr); // This would be 400 (assuming int to be 4 and num elements is 100)
int *ptr = arr;
sizeof(ptr); // This would be 4 (assuming pointer to be 4 bytes on this platform.
It is also important to note that sizeof() returns number of bytes and not number of elements