I'd add an extra parameter with the array size:
int inArrayInt(int iVal, int* iArray, int sizeOfArray)
{
int i;
for(i = 0; i < sizeOfArray; i++)
{
if(iVal == iArray[i])
{
return 1;
}
}
return 0;
}
Then call the function with the size you initiated the array with:
int myArray[100];
if (inArrayInt(42, myArray, 100))
//returned true