void fun(int* array){}
int main(){
int array[]={1,2,3};
fun(&array);----->(1)//error in this line
return 0;
}
error: cannot convert âint (*)[3]â to âint*â for argument â1â to âvoid fun(int*â).
if i am passing fun(&array[0]),its working fine.As per my understanding &array and &array[0] both yield the same address.Kindly clarify.
int (*)[3]. And it is (see the error message)array, the first or the second?&arrayonly occurs in the code once, insidemain.