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

题目内容 (请给出正确答案)
单选题
有以下程序#includemain(){ int a=0,b=0; /*给a赋值a=10;给b赋值b=20; */  printf(a+b=%d,a+b);}程序运行后的输出结果是(  )。
A

a+b=0

B

a+b=30

C

a+b=10

D

出错


参考答案

参考解析
解析:
注释/*和*/之间计算机不参与编译,所以a、b值仍为0。答案选择A选项。
更多 “单选题有以下程序#includemain(){ int a=0,b=0; /*给a赋值a=10;给b赋值b=20; */  printf(a+b=%d,a+b);}程序运行后的输出结果是(  )。A a+b=0B a+b=30C a+b=10D 出错” 相关考题
考题 有以下程序main(){ int a=0, b=0;a=10; /* 给 a 赋值b=20; 给 b 赋值 */printf("a+b=%d\n",a+b); /* 输出计算结果 */}程序运行后的输出结果是A)a+b=10B)a+b=30C)30D) 出错

考题 ( 35 )有以下程序#include stdio.h#define SUB ( a ) ( a ) - ( a )main (){ int a=2,b=3,c=5,d;d=SUB ( a+b ) *c;printf ( " %d \ n " ,d ) ;}程序运行后的输出结果是A ) 0B ) -12C ) -20D ) 10

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

考题 以下程序的运行结果是。void main(){int a=4,b=8,c;c=(a/b= =a)(a+b!=20);printf("%d,%d\n",a,b,c);}

考题 下列程序的输出结果是。void main(){int a=1,b=2; a=a+b;b=a-b;a=a-b; printf("%d,%d\n",a,b);}

考题 有以下程序:includestdiO.hmain( ){int a=1,b=0;printf(%d,,b=a+b);printf(%d\n,a=2+b); ’}程序运行后的输出结果是( )。A.0,0B.1,3C.3,2D.1,2

考题 有以下程序 main() {int a=0,b=0; a=10; /* 给a赋值 b=20; 给b赋值 */ printf("a+b=%d\n",a+b);/* 输出计算结果 */ } 程序运行后的输出结果是______。A.a+b=10B.a+b=30C.30D.出错

考题 下列程序段的输出结果是()CLEARSTORE“10”TOASTORE20TOB?A+B A、1020B、30C、10D、出错

考题 下列程序执行后的输出结果是( )。void func(int*a,int b[]){ b[0]=*a+b;}main{ int a,b[5];a=0;b[0]=3;func(&a,b);printf(%d\n,b[0]); }A.6B.7C.8D.9

考题 以下程序的输出结果是()。includemain(){int a=21,b=11; printf("%d\n",--a+b,--b+a);} 以下程序的输出结果是( )。 #include <stdio.h> main() { int a=21,b=11; printf("%d\n",--a+b,--b+a); }A.30B.31C.32D.33

考题 有以下程序: #includestdio.h #define SUB(a)(a)-(a) main( ) {int a=2,b=3,c=5,d; d=SUB(a+b)*C; printf("%d\n",d); } 程序运行后的输出结果是( )。A.0B.-l2C.-20D.10

考题 有以下程序: #includestdiO.h main( ) {int a=1,b=0; printf("%d,",b=a+b); printf("%d\n",a=2+b); ‘’ } 程序运行后的输出结果是( )。A.0,0B.1,3C.3,2D.1,2

考题 下列程序的输出结果是______。 main() { int x=0,a=0,b=2; if(x=a+b) printf("****\n"); else printf("####\n"); }A.有语法错,不能通过编译B.通过编译,但不能连接C.****D.####

考题 有以下程序includevoid main(){int a=1,b=0;printf("%d,",b=(a++)+(a++));pfintf("%d\ 有以下程序 #include<stdio.h> void main() { int a=1,b=0; printf("%d,",b=(a++)+(a++)); pfintf("%d\n",a+B); } 程序运行后的输出结果是( )。A.4,6B.2,5C.3,5D.2,6

考题 有以下程序: #includestdio.h int f(int x); main( ) { int a,b=0; for(a=0;a3;a++) { b=b+f(a);putchar(A+b);} } int f(int x) { return x * x1; } 程序运行后的输出结果是( )。A.ABEB.BDIC.BCFD.BCD

考题 有以下程序#inculde stdio.h#deFine SUB(a) (a) (a)main(){ int a=2,B=3,c=5,d;d=SUB(a+B)*c;printF(”%d\n”,d);}程序运行后的输山结果是A.0B.-12C.-20D.10

考题 下列程序执行后的输出结果是( )。 void func(int*a,int b[]) { b[0]=*a+b;}main { int a,b[5]; a=0.b[0]=3; func(&a,b);printf("%d\n",b[0]); }A.6B.7C.8D.9

考题 有以下程序: main {int a=0,b=0; a=10; /*给a赋值 b=20; 给b赋值 */ printf("a+b=%d\n",a+b);//输出计算机结果 } 程序运行后的输出结果是( )。A.a+b=10B.a+b=30C.30D.出错

考题 以下程序运行后的输出结果是()。      main( )  {int a=1,b=3,c=5;      if(c=a+b)     printf(“yes”);      else  printf(“not”);  } 

考题 以下程序运行后的输出结果是()。      main( )  {int a=010,b=2,c;      c=a+b;  printf(“%d”,c);      }

考题 写出程序的运行结果。 #include main() { inta,b; scanf(”%d%d",a,b); if(++a=b) printf(”Yes”); printf("a+b=%d/n",a+b); } 如果输入:a=6,b=8,则输出结果是()。

考题 填空题写出程序的运行结果。 #include main() { inta,b; scanf(”%d%d",a,b); if(++a=b) printf(”Yes”); printf("a+b=%d/n",a+b); } 如果输入:a=6,b=8,则输出结果是()。

考题 单选题有以下程序#includeint fun(int a,int b){ return a+b;}main(){ int x = 6,y=7,z = 8,r; r = fun(fun(x,y),z--); printf(%d,r);}程序运行后的输出结果是(  )。A 15B 21C 20D 31

考题 填空题以下程序运行后的输出结果是()。      main( )  {int a=1,b=3,c=5;      if(c=a+b)     printf(“yes”);      else  printf(“not”);  }

考题 填空题以下程序运行后的输出结果是()。      main( )  {int a=010,b=2,c;      c=a+b;  printf(“%d”,c);      }

考题 单选题以下程序: #include #defineSUB(a)(a)-(a) main() {  inta=2,b=3,c=5,d;  d=SUB(a+b)*c;  printf(%d,d); } 程序运行后的结果是(  )。A 0B -12C -20D 10

考题 单选题有以下程序:#include main(){ int a=1,b=0; printf(%d,,b=a+b); printf(%d,a=2*b);}程序运行后的输出结果是(  )。A 0,0B 1,0C 3,2D 1,2