编程常见字符串错错误
#include <unistd.h>
#include <stdio.h>
int main ()
{
char *name1;
name1="111";
char * name2[3];
//name2={"222","222","222"};错误
name2[0]="222";
name2[0]=""222222;//可以改地址,但是不能改内容
name2[1]="222";
name2[2]="222";
char (* name3)[];
char a[3]={'a','b','c'};
//name3=a;//错误
name3=&a;
printf("%s\n",name1);
printf("%c\n",(*name3)[0]);
}