In C, you can only get the size of statically allocated arrays, i.e.
int array[10];
size = sizeof(array) / sizeof(int);
would give 10.
If your array is declared or passed as int* array
, there is no way to determine its size, given this pointer only.