I am observing that only part of an fixed size array is passed to the argument of the function. The argument of the function is a dynamic array. Please look at the observation given below and help in pointing out the issue.
Code
void check_errors(int val, int fault_nums[]) {
PRINT("size of array=%d\nsize of first element of an array=%d",sizeof(fault_nums),sizeof(fault_nums[0]));
...
}
main(){
int farry[6] = {82,83,84,85,199,229};
PRINT("TEST:size of array=%d\nTEST:size of first element of an array=%d",sizeof(farry),sizeof(farry[0])); //PRINT is a predefined function
check_errors(1, farry);
...
}
Observation
PRINT: TEST:size of array=24 TEST:size of first element of an array=4
PRINT: size of array=8 size of first element of an array=4