首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
请读程序:#include <stdio. h>main(){ int a; float b, c; scanf ("% 2d% 3%/4f",&a,&b,&c); printf("\na=%d, b=%f, c=%f\n", a, b, c);}
请读程序:#include <stdio. h>main(){ int a; float b, c; scanf ("% 2d% 3%/4f",&a,&b,&c); printf("\na=%d, b=%f, c=%f\n", a, b, c);}
admin
2013-06-11
20
问题
请读程序:#include <stdio. h>main(){ int a; float b, c; scanf ("% 2d% 3%/4f",&a,&b,&c); printf("\na=%d, b=%f, c=%f\n", a, b, c);} 若运行时从键盘上输入9876543210
,则上面程序的输出结果是______。
选项
A、a=9b=765, c=4321
B、a=10,b=432,c=8765
C、a=98,b=765.000000,c=4321.000000
D、a=98,b=765.0,c=4321.0
答案
4
解析
scanf()用户从键盘录入助数字的第1、2位存入整型变量a;把第3、4、5位存入单精度实型变量b,把第6、7、 8、9位存入单精度实型变量c,用户录入的第10位被scanf()遗弃。这时变量a、b、c的值分别为:98、765.000000、 4321.000000.
转载请注明原文地址:https://jikaoti.com/ti/WAn0FFFM
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
下面描述中,不符合结构化程序设计风格的是
下列关于队列的叙述中,正确的是
下面程序的输出是______。main(){intx=3,y=6,a=0;while(x++!=y-=1)){a+=1;if(y<x)break;}print
有以下程序,程序运行后的输出结果是______。intf(intb[][4]){inti,j,s=0;for(j=0;j<4;i++){i=j;if(i>2)i=3-j;
C语言规定如果调用fputc函数输出成功,则返回值是()。
函数重载是指
在软件工程中,白箱测试法可用于测试程序的内部结构。此方法将程序看作______。
面向对象的设计方法与传统的面向过程的方法有本质不同,它的基本原理是 ______。
若某二叉树的前序遍历访问顺序是ABDGCEFH,中序遍历访问顺序是DGBAECFH,则其后序遍历的结点访问顺序是______。
随机试题
下列氨基酸中属于碱性氨基酸的是
脑血管病的致病之本是
A、脐右下方B、脐右上方C、脐左下方D、脐左上方E、脐周B
关于民事诉讼中人民法院的审判组织,下列说法中错误的是:()
如果一国居民可以在国内自由持有外币资产,如银行外币存款,并可自由地在国内把本国货币兑换成外币资产,则该国货币实现了()。
申请人和被申请人在行政复议机关作出行政复议决定以前可以达成和解,行政复议机关也可以调解,下列选项中不可以和解与调解的有()。
所谓职业道德的自律功能,是指它()的作用。
过去,为解决吃饭问题,曾经大面积毁林开荒。今天,为治理水土流失,防止沙化,我国抓住当前农产品相对充裕的有利时机,有计划地退耕还林还草。这表明()。
某山区发生了较大面积的森林病虫害。在讨论农药的使用时,老许提出:“要么使用甲胺磷等化学农药,要么使用生物农药。前者过去曾用过,价钱便宜,杀虫效果好,但毒性大;后者未曾使用过,效果不确定,价格贵。”从老许的提议中,不可能推出的结论是:
Ifyou’refindingittoughtolandajob,tryexpandingyourjob-huntingplantoincludethefollowingstrategies:Setyour
最新回复
(
0
)