Have a look at following code
void fun( int *p )
{
// is there any solution to calculate size of array as we are not explicitly passing its size.
}
void main ()
{
int a[5];
fun (a);
}
Is there any solution to calculate size of array in function or explicitly passing its size is the only solution?