#include<stdio.h>
void func(int a[10]);
int main(void) {
int arr[10];
func(arr);
return 0;
}
void func(int a[10]) {
int b[10], x=5;
a =&x;
b =&x; //error: assignment to expression with array type
}
In this C code mentioned herewith, there is an error with b=&x
since assignment to expression with array type
but why not with a=&x
after all a
is an array to func
?