以下程序的输出结果是()。void main(){printf("s1=|%15s| s2=|%-5s|","chinabeijing","chi");}
A. s1=|chinabeijing□□□| s2=|chi|
B. s1=|chinabeijing□□□| s2=|chi□□|
C. s1=|□□□chinabeijing|s2=|□□chi|
D. s1=|□□□chinabeijing|s2=|chi□□|
查看答案
以下程序的输出结果是()。void main(){long y=-43456;printf("y=|%-8ld| y=|%-08ld| y=|%08ld| y=|%+8ld|",y,y,y,y);}
A. y=|□□-43456| y=|-□□43456| y=|-0043456| y=|-43456□□|
B. y=|□□-43456| y=|-43456□□| y=|-0043456| y=|-□□43456|
C. y=|-43456□□| y=|-43456□□| y=|-0043456| y=|□□-43456|
D. y=|-43456□□| y=|-4345600| y=|-0043456| y=|□□-43456|
以下程序的输出结果是()。void main(){int y=2456;printf("y=|%3o| y=|%8o| y=|%#8o| y=|%08o|",y,y,y,y);}
A. y=|2456| y=|□□□□2456| y=|□□□02456| y=|00002456|
B. y=|4630| y=|□□□□4630| y=|□□□04630| y=|00004630|
C. y=|2456| y=|□□□□2456| y=|
D. 02456| y=|00002456|
E. y=|4630| y=|4630□□□□| y=|
F. 04630| y=|00004630|
已有定义 int x;float y;且执行scanf("%3d%f",&x,&y);语句时,假设输入数据为12345□678↙,则x、y的值分别为()。
A. 1234 678.000000
B. 123 678.000000
C. 123 45.678000
D. 123 45.000000
若x为float类型变量,则以下语句的运行结果为()。x=117.28362;printf("%6.2f\n",x);
A. 117.2
B. 117.28
C. 117.284
D. 117.283