【单选题】
执行下列程序后,其输出成果是___ main() {int a=9; a+=a-=a+a; printf(“%d\n”,a);}
A. 18
B. 9
C. -18
D. -9
查看试卷,进入试卷练习
微信扫一扫,开始刷题

答案
C
解析
暂无解析
相关试题
【单选题】
若int类型数据占两个字节,则下列语句的输出是___ int k=1; printf(“%d,%u\n”,k,k)
A. -1,-1
B. -1,32767
C. -1,32768
D. -1,65535
【单选题】
若k,g均为int变量,则下列语句的输出为___ k=017; g=111; printf(“%d\t”,++k); printf(“%x\n”,g++)
A. 15 6f
B. 16 70
C. 15 71
D. 16 6f
【单选题】
以下程序的输出结果是___ main() {int i=010;j=10; printf(“%d,%d\n”,++i,j--);}
A. 11,10
B. 9,10
C. 010,9
D. 10,9
【单选题】
C语言中以下几种运算符的优先次序的排列是正确的___
A. 由高到低为:!,&&,||,算术运算符,赋值运算符
B. 由高到低位:!,算术运算符,关系运算符,&&,||,赋值运算符
C. 由高到低为:算术运算符,关系运算符,赋值运算符,!,&&,||
D. 由高到低为:算术运算符,关系运算符,!,&&,||,赋值运算符
【单选题】
以下程序的输出结果为___ main() {float x=3.6; int i; i=(int)x; printf(“x=%f,i=%d\n”,x,i)}
A. x=3.600000,i=4
B. x=3,i=3
C. x=3.600000,i=3
D. x=3 i=3.600000
【单选题】
以下程序的运算结果是___ main() {int i=0,sum=0; while(i<20) sum=sum+1;i++; printf(“i=%d,sum=%d”,i,sum);}
A. i=10,sum=9
B. i=9,sum=9
C. i=2,sum=1
D. 运行出现错误
【单选题】
以下程序的运行结果为___ main() {int n; for(n=1;n<=10,n++){ if(n%3==0)continue; printf(“%d”,n);}}
A. 12457810
B. 369
C. 12
D. 123456789
【单选题】
在C语言中,if语句后的一对原括号中,用以决定分支的流程的表达式___
A. 只能用逻辑表达式
B. 只能用关系表达式
C. 只能用逻辑表达式或关系表达式
D. 可用任意表达式
【单选题】
假定所有变量均为已正确定义,下列程序段运行后x的值是___ k1==1; k2=2; k3=3; x=15; if(!k1)x--; else if(k2) x=4; else x=3
A. 14
B. 4
C. 15
D. 3
【单选题】
执行下列语句后的输出为___ int j=-1; if(j<=1) printf(“****\n”); else printf(“%%%%\n”)
A. ****
B. %%%%
C. %%%%c
D. 有错,执行不正确
【单选题】
下列程序的输出结果是___ main() {int x=1,y=0,a=0,b=0; switch(x){case 1;switch(y){case 0;a++;break; case1;b++;break;}}}
A. a=1,b=0
B. a=2,b=1
C. a=1,b=1
D. a=2,b=2
【单选题】
下列程序的输出为___ main() {int y=10; while(y--); printf(“y=%d\n”,y);}
A. y=0
B. while构成无限循环
C. y=1
D. y=-1
【单选题】
设j和k都是int类型,则for循环语句 for(j=0,k=1;k++) printf(“****\n”);___
A. 循环结束的条件不合法
B. 是无限循环
C. 循环体一次也不执行
D. 循环体只执行一次
【单选题】
下列数组说明中,正确的是___
A. static char str[]=“China”
B. static char str[];str=“China”
C. static char str1[5],str2[]={“China”}; str1=str2
D. static char str1[],str2[];str2={“China”};strcpy(str1,str2)
【单选题】
下列定义数组的语句中正确的是___
A. #define size 10 char str1[size],str2[size+2]
B. char str[]
C. int num[‘10’]
D. int n=5;int a[n][n+2]
【单选题】
下列定义数组的语句中不正确的是___
A. static int a[2][3]={1,2,3,4,5,6}
B. static int a[2][3]={{1},{4,5}}
C. static int a[][3]={{1},{4}}
D. static int a[][]={{1,2,3},{4,5,6}}
【单选题】
下列语句中,不正确的是___
A. static char a[2]={1,2}
B. static int a[2]={‘1’,‘2’}
C. static char a[2]={‘1’,‘2’,‘3’}
D. static char a[2]={‘1’}
【单选题】
若输入ab,程序运行结果为___ main() { static char a[3]; scanf(“%s”,a); printf(“%c,%c”,a[1],a[2]);}
A. a,b
B. a,
C. b,
D. 程序出错
【单选题】
关于return语句,下列正确的说法是___
A. 不能在主函数中出现且在其他函数中均可出现
B. 必须在每个函数中出现
C. 可以在同一个函数中出现多次
D. 只能在除主函数之外的函数中出现一次
【单选题】
在C语言程序中___
A. 函数的定义可以嵌套,但函数的调用不可以嵌套
B. 函数的定义不可以嵌套,但函数的调用可以嵌套
C. 函数的定义和函数的调用均可以嵌套
D. 函数的定义和函数的调用不可以嵌套
【单选题】
C语言程序中,当调用函数时___
A. 实参和虚参各占一个独立的存储单元
B. 实参和虚参可以共用存储单元
C. 可以由用户指定是否共用存储单元
D. 计算机系统自动确定是否共用存储单元
【单选题】
以下描述中,正确的是___
A. 预处理是指完成宏替换和文件包含中指定的文件的调用
B. 预处理指令只能位于C源文件的开始
C. C源程序中凡是行首以#标识的控制行都是预处理指令
D. 预处理就是完成C编译程序对C源程序第一遍扫描,为编译词法和语法分析做准备
【单选题】
执行下面程序后,输出结果是___ main() { a=45,b=27,c=0; c=max(a,b); printf(“%d\n”,c);} int max(x,y) int x,y; {int z; if(x>y) z=x;}
A. 45
B. 27
C. 18
D. 72
【单选题】
以下程序的输出结果为___ main() {int a=1,b=2,c=3,d=4,e=5; printf(“%d\n”,func((a+b,b+c,c+a),(d+e)));} int func(int x,int y) {return(x+y);}
A. 15
B. 13
C. 9
D. 函数调用出错
【单选题】
设j和k都是int 类型,则下面的for循环语句___ for(j=0.k=0;j<=9&&k!=876;j++) scanf(“%d”,&k)
A. 最多执行10次
B. 最多执行9次
C. 是无限循环
D. 循环体一次也不执行
【单选题】
下列程序段的输出结果为___ float k=0.8567; printf(“%06.1f%%”,k*100)
A. 0085.6%%
B. 0085.7%
C. 0085.6%
D. 857
推荐试题
【填空题】
make it, with open arms ,strip off,keep back,
free of/ from ,after all,straighten up, throw away
Redecorating the house is a challenging task. It's necessary to [ ] the wallpaper first.
【填空题】
make it, with open arms ,strip off,keep back,
free of/ from ,after all,straighten up, throw away
I never really had any problems with change. On the contrary, I welcome change [ ]
【填空题】
make it, with open arms ,strip off,keep back,
free of/ from ,after all,straighten up, throw away
A lot of what we [ ] is made from raw materials which are not renewable
【填空题】
make it, with open arms ,strip off,keep back,
free of/ from ,after all,straighten up, throw away
Megan and John realized that their house was too messy for a new baby, so they decided to [ ] their house before the baby was born
【填空题】
make it, with open arms ,strip off,keep back,
free of/ from ,after all,straighten up, throw away
Jennifer couldn't [ ] her tears when she saw the sick children at a new blood cancer center in Virginia
【填空题】
make it, with open arms ,strip off,keep back,
free of/ from ,after all,straighten up, throw away
We want to give all children a world [ ] violence
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
Fortunately, the accident didn't [ ] many people, for there was little traffic at that hour.
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
She[ ] her ambition of becoming a fashion designer after years of hard work
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
They kept on trying their best to develop
their business, but in such [ ]market competition, they had no Idea if success would come along one day
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
As music plays an important role in our life, many music teachers and educators [ ] taking up a musical instrument at a young age
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
This rule should be entirely clear in the minds of everyone and should not be misunderstood under any [ ]
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
My daughter was shy; she was afraid to ask questions,[ ] to questions in class,or talk with other children
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
I got from him only a letter, which was put on my office desk; [ ] to the receipt of this letter I have never heard from him
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
The duties to provide services for children in need are not [ ] to the local social services department
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
We pray that all nations be [ ] and that all people around the world live in peace
【填空题】
controversial,assess, resolve,decrease,alter,abandon,indicate,undermine,compromise, conventional
It was reported the president had [ ]to fight If war was necessary,even if it meant destroying his chances of re-election
【填空题】
controversial,assess, resolve,decrease,alter,abandon,indicate,undermine,compromise, conventional
I had to [ ] one of my email accounts as it was filled with junk mail
【填空题】
controversial,assess, resolve,decrease,alter,abandon,indicate,undermine,compromise, conventional
Darwin's theory of evolution remains[ ] partly because it challenges the religious belief that God created man
【填空题】
advocate,involve,confine,respond,subsequent ,distinct ,intense, fulfill,circumstance, reconcile
He suggested a small but [ ] improvement on our former plan; I really appreciate it.
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
She held her hand above her eyes to [ ]them [ ] the sun so that she could see more clearly the man in front of her
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
The boy studied the signs for over an hour,but still could not [ ]them, so he turned to his teacher for help
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
They [ ] the developed countries to commit more money to protecting the environment
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
We will continue to care for those [ ] and work to establish a society that is generous and prosperous
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
Many people [ ]careers and raising kids so that they forget that their marriages also need to be taken good care of
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
My most favorite program is the one that deals with scientific subjects that ordinary people can [ ]
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
Finally, I would like to [ ]by saying that it has been a tremendous pleasure to work with you all
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
He is a person that you always [ ]when you need help.
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
This restaurant is very popular because it has some separate, smaller rooms [ ] families with small children
【填空题】
in sb. 's words,count on,make sense of ,reserve for, shield from,call on, sum up, relate to ,in need,
be/ get caught up in
Betty loves reading.[ ],“Reading is the most wonderful thing in the world.”
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in,
Every one of you has made a contribution and I [ ] knowledging what each of you has done to make this academic convention such a success.
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in
They all tried to talk [ ], but I couldn't hear anything they said
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in,
Yellow flowers in the field always [ ] me [ ] my childhood in the countryside
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in,
We have been practicing for so long and so hard that our team should [ ]winning the game
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in,
Research on genes will [ ] exciting new medical treatments.,
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in,
My family [ ] on my father's unemployment benefit after he lost his job
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in,
Many subway riders read books or listent music in order to [ ] their time on the way to work
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in,
In order to make sure he would be able to attend the meeting, I called him up two weeks [ ]
【填空题】
open the door to,In advance,all at once,reap the benefits (of), make the most of,over time, get by, stand a chance (of),remind of, take pleasure in,
In order to [ ]physical exercise, you have to exercise regularly and for at least half an hour each time
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical
Mary was a careful speaker, every word seemed to have been [ ] before it was allowed to escape through her lips
【填空题】
embarrass,polish, emotional, etticiency,curb ,await, donation ,dump,stuff ,historical
He has a special feeling for the brilliant birds, and each spring he eagerly [ ] their return