一、字符数组的表示
用char表示一串字符串
两种初始化方法
普通方法
char a[19]={'a','s','\0');
特殊方法(独有的)
//特殊的初始化方法,不能超长度
char str[6]="hello";
str[0]='h' str[1]='e' str[2]='l' str[3]='l' str[4]='0' str[4]='0'//末尾是0
二、字符数组的打印
printf("%s",str);
三、举例
#include<stdio.h>
int main(){
char str[]="hello: \n123 \n";
printf("%s",str);
return 0;
}