main() {printf("%3s,%7.2s,%.4s,%-5.3s\n","CHINA","CHINA","CH
来源:学生作业帮 编辑:搜狗做题网作业帮 分类:综合作业 时间:2024/07/20 04:15:55
main() {printf("%3s,%7.2s,%.4s,%-5.3s\n","CHINA","CHINA","CHINA","CHINA"); }
结果怎么是CHINA,CH,CHIN,CHI,%3s,%7.2s,%4s,%-5.
结果怎么是CHINA,CH,CHIN,CHI,%3s,%7.2s,%4s,%-5.
![main() {printf(](/uploads/image/z/19297190-38-0.jpg?t=main%28%29+%7Bprintf%28%22%253s%2C%257.2s%2C%25.4s%2C%25-5.3s%5Cn%22%2C%22CHINA%22%2C%22CHINA%22%2C%22CH)
CHINA,CH,CHIN,CHI,
%3s,格式输出字符串,右对齐,超出3个长度的,就全部输出;
%7.2s,输出字符串占7个位置,有对齐,左补空格,输出2个字符;
%.4s,仅输出4个字符,占位4个位置,右对齐;
%-5.3s:输出3个字符,占位5个位置,左对齐右补空格.
%3s,格式输出字符串,右对齐,超出3个长度的,就全部输出;
%7.2s,输出字符串占7个位置,有对齐,左补空格,输出2个字符;
%.4s,仅输出4个字符,占位4个位置,右对齐;
%-5.3s:输出3个字符,占位5个位置,左对齐右补空格.
int f(int n); main() { int a=3,s; s=f(a); s=s+f(a); printf("
int f(int n); main() { int a=3,s; s=f(a); s=s+f(a); printf(&
printf("%s\n",((i
printf("%s%s%s%d%d%d\n",printf("\n");
main() { char s[]="stop\0\n\""; printf("%d\n",strlen(s)) }
China's &chinese
what's China like?
China's Got Talent
China's national day
()that?__It's,china.
China’s three-pronged
china可不可以加S