首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
下列程序的输出结果是( )。 #include<stdio.h> #defineF(x)2.84+x #define w(y) printf("%d",(int)(y)) #define P(y)w(y)putchar(’\n
下列程序的输出结果是( )。 #include<stdio.h> #defineF(x)2.84+x #define w(y) printf("%d",(int)(y)) #define P(y)w(y)putchar(’\n
admin
2013-06-11
25
问题
下列程序的输出结果是( )。 #include<stdio.h> #defineF(x)2.84+x #define w(y) printf("%d",(int)(y)) #define P(y)w(y)putchar(’\n’) main() { int x=2; P(F(5)*x); }
选项
A、12
B、13
C、14
D、16
答案
1
解析
本题考查带参数的宏的定义及相关运算。P(F(5)*x)=P(2.84+5*2)=P(12.84),调用w(12.84),输出(int)(12.84)=12。
转载请注明原文地址:https://kaotiyun.com/show/2CJp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
已有定义:chara[]="xyz",b[]={’x’,’y’,’z’};,以下叙述中正确的是
若有说明语句:intx=3,y=4,z=5;,则下面的表达式中,值为0的是______。
下列用于printf函数的控制字符常量中,代表“竖向跳格”的转义字符常量是______。
下面程序的输出结果是() main() { charx=040; print{("%d\n",x=x<<1);}
下列程序执行后输出的结果是【】。structs{intx,y;}data[2]={10,100,20,200};main(){structs*p=data;printf("%d\n"
数据库管理系统是位于用户与【】之间的软件系统。
下列叙述中正确的是______。
数据结构分为逻辑结构与存储结构,带链的栈属于【】。
数据库管理系统提供给用户的接口是()
模块本身的内聚是模块独立性的重要性度量因素之一。在7类内聚中,具有最强内聚的一类是__________。
随机试题
男性,56岁。患慢性骨髓炎8个月,血红蛋白70g/L,白细胞、血小板正常。血清铁6.21μmol/L,铁蛋白206μg/L,骨髓增生活跃,细胞外铁(+++)。该患者治疗措施主要是
A.胆碱酯酶活性受抑制B.碳氧血红蛋白体内蓄积C.高铁血红蛋白体内蓄积D.交感神经过度兴奋E.迷走神经过度兴奋CO中毒的机制是
A.去心B.去皮壳C.去毛D.去核E.去残肉
某公司7月份发生下列经济业务(不考虑相关税费):(1)销售材料一批,货款2000元,当即存入银行。(2)销售产品一批,货款5000元,当即收到4000元存入银行,其他货款暂欠。(3)预付7~12月的固定资产租金3000元。(4)收到3月份的应收
投机方法中,属于建仓阶段内容的有()。
下列选项中,关于个人商用房贷款,说法正确的有()。
考古学家在阿拉伯半岛的阿尔马塔夫遗址中已清理出9000多件遗物,其中90%以上为当地的朱尔法淘,包括一件完整的朱尔法夹砂红陶罐;西亚釉陶仍为孔雀绿釉陶和熔块胎陶;中国产的瓷器有龙泉窑青瓷,景德镇窑青花瓷、白瓷、青白瓷及广东地区产酱釉粗瓷等;另有泰国产青瓷。
[A]TheLaborDepartmentexpectstwomillionnewjobsthisyearontopofthe1.7millioncreatedlastyear.Helpingtofuelwha
Ipromisedtomeethimthereinamonth,______Iwassufficientlyrecoveredtodoso.
A、onetoworkmoreefficientlyB、topromoteastrongheartC、toloseweightD、onetosleepbetterB
最新回复
(
0
)