首页
外语
计算机
考研
公务员
职业资格
财经
工程
司法
医学
专升本
自考
实用职业技能
登录
计算机
有以下程序: #include<stdio.h> #define X 5+6 main() { int a=2,c; C=X*2; printf(’’%d’’,c);} 程序运行后的输出结果是(
有以下程序: #include<stdio.h> #define X 5+6 main() { int a=2,c; C=X*2; printf(’’%d’’,c);} 程序运行后的输出结果是(
admin
2018-09-26
78
问题
有以下程序:
#include<stdio.h>
#define X 5+6
main()
{ int a=2,c;
C=X*2;
printf(’’%d’’,c);}
程序运行后的输出结果是( )。
选项
A、17
B、22
C、16
D、11
答案
A
解析
define语句仅进行简单替换,因此c=5+6*2=17。
转载请注明原文地址:https://kaotiyun.com/show/vNxp777K
本试题收录于:
二级C语言题库NCRE全国计算机二级分类
0
二级C语言
NCRE全国计算机二级
相关试题推荐
下列程序的输出结果是_______。#include<stdio.h>main(){union{intk;chari[2];}*s,a;s=&a;
下列程序的运行结果是______。voidfun(int*a,int*b){int*k;k=a;a=b;b=k;}main(){inta=3,b=6,*x=&a,*y=&b;
有以下程序:#include<stdio.h>main(){int.a[]={1,2,3,4,5,6,7,8,9,10,11,12,},*p=a+5,*q=NULL;*q=*(p+5);printf("%
以下叙述中正确的是()。
有以下程序:#include<stdio.h>floatf1(floatn){returnn*n;}floatf2(floatn){return2*n;}main(){float(*p1)(float),(*
以下程序的输出结果是______。 main() { union { int i[2]; long j; char m[4]; }r,*s=&r; s->i[0]=0x409; s->i[1]=0x407; printf("%d\n",s->m[0]);
程序中若有如下说明和定义语句Charfun(char*);main(){char*s="one",a[5]={0}.(*f1)()=fun,ch;…}以下选项中对函数fun
若函数调用时的实参为变量,以下关于函数形参和实参的叙述中正确的是()。
已有定义:inti,a[10],*p;,则合法的赋值语句是
下列说法中不正确的是()。
随机试题
分析企业盈利能力时,需要关注的特殊项目或因素包括()
A、teachersareeasytobemisunderstoodB、teachersareeasytobewrongedC、studentratingscaneasilybeputtowronguseD、stu
影响腰麻醉平面的因素有
以下不属于等音程的是()
小明、小张二人相距50米面对面站好,两人玩竞猜游戏,胜者向前走3米,负者向后退2米,平局两人各向前走1米,玩了15局后,小明距出发点15米,小张距出发点5米,小明的成绩是()。
下列关于数据库设计的叙述中,正确的是( )。
TheLagoonShow礁糊秀ThemostromantictimetoarriveinVeniceisatduskonawinter’sday.Y
Theworldisgoingthroughthebiggestwaveofmergersandacquisitions(收购)everwitnessed.TheprocesssweepsfromhyperactiveA
A、Hewasagreattalkerwithgoodcharacters.B、HewasastudentofthegreatPhilosopherPlato.C、Hewascondemnedbystudents
A、Childrenshouldbetaughttobemorecareful.B、Childrenshouldn’tdrinksomuchorangejuice.C、Thereisnoneedfortheman
最新回复
(
0
)