#include <stdio.h> int main() { //char s[] = {'h','e','l','l','o','\0'}; char s[] = {"hello"}; //这种方式可以省略结尾的\0 printf("%s\n",s);//利用%s参数,可以省略我们自己写循环,一个个输出,%c只能输出单个成员 return 0; }
#include <stdio.h> int main() { //char s[] = {'h','e','l','l','o','\0'}; char s[] = {"hello"}; //这种方式可以省略结尾的\0 printf("%s\n",s);//利用%s参数,可以省略我们自己写循环,一个个输出,%c只能输出单个成员 return 0; }
本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。