字符串长度和打印
char s[]="hello world"; sizeof(s)=12 strlen(s)=11 printf("%s",s) hello world
char s[100]="hello world"; sizeof(s)=100 strlen(s)=11 printf("%s",s) hello world
char s[10]={'h','e','l','l','o','w','o','r','l','d'}; sizeof(s)=10 strlen(s)=10+x printf("%s",s) hello world@#%@#$^@#$
char s[]="hello\0world"; sizeof(s)=12 strlen(s)=5 printf("%s",s) hello
char s[]="hello\012world"; sizeof(s)=12 strlen(s)=11 printf("%s",s) hello(换行)world ---这里的\012是ascii码8进制的12对应的字符,也就是十进制的\10 就是\n。(\0nn 八进制 \xnn 十六进制 \nn 十进制)