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

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"};  

  

posted @ 2018-06-11 15:33  add_server  Views(2048)  Comments(0)    收藏  举报