This is well known code to compute array length in C:
sizeof(array)/sizeof(type)
But I can\'t seem to find out the length of the array pass
As stated by @Will, the decay happens during the parameter passing. One way to get around it is to pass the number of elements. To add onto this, you may find the _countof() macro useful - it does the equivalent of what you've done ;)
_countof()