void fun(int* array){} int main(){ int array[]={1,2,3}; fun(&array);----->(1)//error in this line return 0; }
error: cannot convert â
You have mismatching types.
The function expects *int (pointer to an int).
*int
array and &array[0] is of that type, *int.
array
&array[0]
But &array is of type int(*)[3] (pointer to an array of 3 ints).
&array
int(*)[3]