C语言能直接用一个数组名对数组进行赋值吗?

如题所述

第1个回答  2022-11-16

可以的 。

int a[3] = {1,2,3};
int b[3];
b = a;

错误提示:

F:\>gcc test.c
test.c: In function 'main':
test.c:8:4: error: incompatible types when assigning to type 'int[3]' from type
'int *'

相似回答