This will give you the sizeof the pointer,which can be 2,4 or 8 depending on the system.Value 2 is very rare.

What you should do, is what you already did.Pass the size of the array as second...