As a parameter int iArray[]
is equivalent to int *iArray
.
So when you do
int arrayL=sizeof(*iArray)/sizeof(int);
You are actually doing
int arrayL=sizeof(int)/sizeof(int);
Which is the same size.
You need to add a parameter with which you pass the size information.
int inArrayInt(int iVal, int iArray[], size_t numel){
...
for(i=0;i