网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

设有定义int m=1,n=-1;则执行语句printf(〞%d/n〞,(m--&&++n));后的输出结果是()

  • A、-1
  • B、0
  • C、1
  • D、2

参考答案

更多 “设有定义int m=1,n=-1;则执行语句printf(〞%d/n〞,(m--++n));后的输出结果是()A、-1B、0C、1D、2” 相关考题
考题 有以下程序main(){ int k=5;while(--k) printf("%d",k -= 3);printf("\n");}执行后的输出结果是A)1B)2C)4D) 死循环

考题 若变量已正确定义,则以下语句的输出结果是s=32; s ^ =32; printf("%d",s);A)-1B)0C)1D)32

考题 设有定义: float x=123.4567; ,则执行以下语句后的输出结果是 【 6 】 。printf("%f\n",(int)(x*100+0.5)/100.0);

考题 若有定义 : float x=1.5; int a=1,b=3,c=2; 则正确的 switch 语句是A)switch(x){ case 1.0: printf("*\n");case 2.0: printf("**\n");}B)switch((int)x);{ case 1: printf("*\n");case 2: printf("**\n");}C)switch(a+b){ case 1: printf("*\n");case 2+1: printf("**\n");}D)switch(a+b){ case 1: printf("*\n");case c: printf("**\n");}

考题 有以下程序#include stdio.hmain(){ int m=1,n=2,*p=m,*q=n,*r;r=p;p=q;q=r;printf("%d,%d,%d,%d\n",m,n,*p,*q);}程序运行后的输出结果是A)1,2,1,2B)1,2,2,1C)2,1,2,1D)2,1,1,2

考题 设有如下定义:int x=1,y=-1;则下列语句的输出结果是______。printf("%d\n",(x--++y));A.1B.0C.-1D.2

考题 已知int k=10,m=3,n;则下列语句输出结果是printf("%d\n",n=(k%m,k/m));A.2B.3C.4D.5

考题 设有定义:float x=123.4567;,则执行以下语句后的输出结果是[ ]。printf("%f\n"(int)(x*100+0.5)/100.1;

考题 若有如下程序: int sub(int m) { if(m==1||m==0) return 2; else return(sub(m-1)*sub(m-2));} main() { int n; scanf("%d",n); printf("%d",sub(n)); } 如果从键盘输入4<回车>,则程序运行后的输出结果是( )。A.8B.16C.24D.32

考题 设有如下定义 int x=10,y=3,z; 则语句 printf("%d\n",z=(x%y,x/y)); 的输出结果是( )A.3B.0C.4D.1

考题 设有说明:int a=1,b=0;,则执行以下语句的输出结果是______。 switch(a) {case 1: switch(b) {case 0:printf("**0**\n");break; case 1:printf("**1*\n");break; } case 2:printf("**2**\n");break; }A.**0**B.**0** **2**C.**0** **1** **2**D.switch语句中存在语法错误

考题 设有如下定义: int x=10,y=3,z; 则语句printf("%d\n",z=(x%y,x/y)); 的输出结果是( )。A.1SX 设有如下定义: int x=10,y=3,z; 则语句printf("%d\n",z=(x%y,x/y)); 的输出结果是( )。A.1B.0C.4D.3

考题 已知int a=1,b=-1;则语句printf("%d\n",(a--,++b));的输出结果是A.-1 B.0 C.1 D.语句错误

考题 若有以下程序main(){ int p=5,a=5; if(p=1!=0) printf("%d\n",p); else printf("%d\n",p+2);}程序执行后的输出结果是

考题 有以下程序: #includestdio.h int f(int x): main {int n=1,m; m=f(f(f(n)));printf("%d\n",m); } int f(int x) {return x*2;) 程序运行后的输出结果是( )。A.1B.2C.4D.8

考题 有以下程序:includestdio.hint f(int x):main{int n=1,m;m=f(f(f(n)));printf(%d\n,m);}int f(int x){return x*2;)程序运行后的输出结果是( )。A.1B.2C.4D.8

考题 以下程序的输出结果是()      #include      main( )  {int a,b,d=241;      a=d/100%9;  b=(-1)&&(-1);  printf(“%d,%d/n”,a,b);} A、6,1B、6,0C、2,1D、2,0

考题 设有如下定义:int a=1,b=2,c=3,d=4,m=5,n=6;则执行表达式:(m=ab)‖(n=cd)后,n的值是()    A、1B、0C、5D、6

考题 设有定义:intx=0,*p=x;则语句printf(“%d/n”,*p);的输出结果是()A、随机值B、0C、x的地址D、p的地址

考题 设有如下定义:intx=10,y=3,z;则语句 printf("%d/n",z=(x%y,x/y));的输出结果是()A、1B、0C、4D、3

考题 设有如下定义:int x=l,y=-1;,则语句:printf("%d/n",(x--++y));的输出结果是()A、1B、0C、-1D、2

考题 设有说明语句:int x=1;,语句printf(“%d/n”,-x++);的输出结果是()A、-1B、0C、1D、2

考题 执行下列语句后的输出为().   int j=-1;  if(j=1) printf("****/n");   else     printf("%%%%/n");A、****B、%%%%C、%%%%cD、有错,执行不正确

考题 设有如下定义:intx=l,y=-1;,则语句:printf(""%d/n"",(x--++y));的输出结果是()A、1B、0C、-1D、2

考题 单选题设有说明语句:int x=1;,语句printf(“%d/n”,-x++);的输出结果是()A -1B 0C 1D 2

考题 单选题设有如下定义:intx=l,y=-1;,则语句:printf(""%d/n"",(x--++y));的输出结果是()A 1B 0C -1D 2

考题 单选题设有定义int m=1,n=-1;则执行语句printf(〞%d/n〞,(m--++n));后的输出结果是()A -1B 0C 1D 2