No, you cannot calculate the size of the array. Objects in C do not carry type information, so you must arrange to know the size of the array ahead of time. Something like this:
void my_function(int array[], int size);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…