数组,字串整体赋值问题
#include <stdio.h>
int main()
{
int a[4]={1,2,3,4};
char b[4]="5678";
char *c="9999";
int d[4]={5,6,7,8};
//a={5,6,7,8};//不能整体赋值
//a=&d;//不能整体赋值
a[3]=5;
b[3]='4';
//c[3]='7';//gcc编译无错,运行时段错误
}
#include <stdio.h>
int main()
{
int a[4]={1,2,3,4};
char b[4]="5678";
char *c="9999";
int d[4]={5,6,7,8};
//a={5,6,7,8};//不能整体赋值
//a=&d;//不能整体赋值
a[3]=5;
b[3]='4';
//c[3]='7';//gcc编译无错,运行时段错误
}