C语言中字符串的几种定义方式

第1种:

char a[5]="hello";

第2种:

char a[]="hello";

第3种:

char* a="hello";

第4种:

char a[10];
gets(a);

第5种:

char* a[5]={"hello",
"nihao",
"good",
"ok",
"bye"};

完!!

你可能感兴趣的:(C语言拾遗)