The array that I try to send to the called function is not being sent properly. Suppose I have inserted five elements in the array 'a' and i pass the array using the function insert function and check the size of array in using the last two lines of the following code, it displaying one less than the actual size of the array. Why is this happening??
void main()
{
//rest of the code
insert(a,key); //user-defined function
}
void insert(int a[],int key)
{
int *p=a;
int n = sizeof(a);
printf("No. of elements entered:%d\n",n);
}