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

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

16、下面程序运行后的输出结果是#include <stdio.h> int main() { int a=3,b=4,c=5,d=2; if(a>b) { if(b>c) { printf("%d",d++ +1); } else { printf("%d",++d +1); } } printf("%d\n",d); return 0; }

A.2

B.3

C.43

D.44


参考答案和解析
t a=1,b=0; if(!a) b++; else b+=3; printf(“%d\n”,b); return 0;
更多 “16、下面程序运行后的输出结果是#include <stdio.h> int main() { int a=3,b=4,c=5,d=2; if(a>b) { if(b>c) { printf("%d",d++ +1); } else { printf("%d",++d +1); } } printf("%d\n",d); return 0; }A.2B.3C.43D.44” 相关考题
考题 下列程序的输出结果是() include main() {int a=3,b=2,c=1; if(a 下列程序的输出结果是( )#include<stdio.h>main(){int a=3,b=2,c=1;if(a<b)if(b<0) c=0;else c++;printf("%d\n",c);}A.0B.2C.1D.3

考题 下列程序的运行结果是()。 include main() {int a=2,b=3,c=4;ifa 下列程序的运行结果是( )。#include<stdio.h>main(){ int a=2,b=3,c=4;ifa<B)if(b<0)c=0;else c+=1;printf("%d\n",C) ;}A.2B.3C.5D.4

考题 以下程序的输出结果是( )。 includefun(){ int a=0;a+=3;printf("%d",A); } main() {int 以下程序的输出结果是( )。include<stdio.h>fun(){ int a=0;a+=3;printf("%d",A);}main(){ int cc;for(cc=1;cc<=4;cc++)fun();printf("\n");}

考题 下面程序的运行结果是[]。include int f(int a[],int n){ if(n>1)return a[0]+f(a+1,n-1 下面程序的运行结果是[ ]。include <stdio.h>int f(int a[],int n){ if(n>1)return a[0]+f(a+1,n-1);elsereturn a[0];}main(){int aa[10]={12,3,4,5,6,7,8,9,10},s;s=f (aa+2,4); printf("%d\n",s); }

考题 有以下程序: main() { int a=3,b=4,c=5,d=2; if(a>b) if(b>c) printf("%d",d++ +1); else printf("%d",++d +1); printf("%d\n",d); } 程序运行后的输出结果是( )。A.2B.3C.43D.44

考题 以下程序的输出结果是()。include main(){int i; for(i=1;i 以下程序的输出结果是( )。 #include <stdio.h> main() { int i; for(i=1;i<5;i++) { if(i%2) printf("*"); else continue; printf("#"); } printf("$\n");A.*#*#*#$B.#*#*#*$C.*#*#$D.#*#*$

考题 下列程序的输出结果是()。 include int fun(int x) {int a;if(x==0‖x==1) return 3;els 下列程序的输出结果是( )。 #include<stdio.h> int fun(int x) { int a; if(x==0‖x==1) return 3; else a=x-fun(x-2); return a; } void main() { printf("%d",fun(7)); }A.2B.8C.9D.5

考题 有以下程序:includeintf(intn)} if(n==1)return 1;else return f(n-1)+1;}main(){int 有以下程序: #include <stdio.h> intf(intn) } if(n==1) return 1; else return f(n-1)+1; } main() { int i,j=0; for(i=1; i<3; i++) j+=f(i); printf("%d\n",j); } 程序运行后的输出结果是( )。A.4B.3C.2D.1

考题 下面程序的输出结果是includemain(){int a[]={1,2,3,4,5,6,7,8,9,0},*p;p=a;printf("% 下面程序的输出结果是 #include<stdio.h> main() { int a[]={1,2,3,4,5,6,7,8,9,0},*p; p=a; printf("%d\n",*p+9);}A.0B.1C.10D.9

考题 以下程序运行后的输出结果是( )。 include main() { int x=20; printf("%d", 0 以下程序运行后的输出结果是( )。include<stdio.h>main(){ int x=20;printf("%d", 0<x<20);printf("%d\n", 0<x x<20);}

考题 有以下程序 include int fun(int a, int b) { if(b==0) return a; 有以下程序 #include <stdio.h> int fun(int a, int b) { if(b==0) return a; else return(fun(-a,-b)); } main() { printf("%d\n",fun(4,2)); } 程序的运行结果是______。A.1B.2C.3D.4

考题 以下程序的输出结果是()。includemain(){int n=4; while(n--) printf("%d",--n);}A.2 0 以下程序的输出结果是( )。 #include <stdio.h> main() { int n=4; while(n--) printf("%d ",--n); }A.2 0B.3 1C.3 2 1D.2 1 0

考题 下述程序的输出结果是()。include int f(n)int n;{if(n==0 | | n==1)return 3;return n 下述程序的输出结果是( )。 #include <stdio.h> int f(n) int n; { if(n==0 | | n==1) return 3; return n-f(n-2); } void main() {printf("\n%d",f(10)); }A.3B.8C.9D.10

考题 有以下程序:includeint fun(int x,int y){if(x==y)return(x);else return((x+y)/2);}m 有以下程序: #include<stdio.h> int fun(int x,int y) {if(x==y)return(x); else return((x+y)/2); } main() {int a=1,b=2,c=3; printf("%d\n",fun(2*a,fun(b,C))); } 程序运行后的输出结果是( )。A.2B.3C.4D.5

考题 下列程序的运行结果是()。include main(){int a=2,b=3,c=4; if(a 下列程序的运行结果是( )。 #include <stdio.h> main() { int a=2,b=3,c=4; if(a<b) if(b<0) c=0; else c+=1; printf("%d\n", c); }A.2B.3C.5D.4

考题 下列程序的输出结果是()。includeint fun(int x){int p; if(x==0‖x==1)return 3; elsep 下列程序的输出结果是( )。 #include<stdio.h> int fun(int x) { int p; if(x==0‖x==1) return 3; else p=x-fun(x-2); return p; } void main() { printf("\n%d",fun(5)); }A.5B.3C.7D.1

考题 下面程序的输出结果是 #include stdio.h main(){ int i=2; printf("%d",f(i,i+1) ); } int f(int a,int b) { int c; c=a; if(ab) c=1; else if(a==b) c=0; else c=-1; return(c);}A.-1 B.0 C.1 D.2

考题 下列程序的输出结果是()。include main () {int a=3,b=2,c=1;if (a 下列程序的输出结果是( )。 #include <stdio.h> main () { int a=3,b=2,c=1; if (a<b) if (b<O) c=0 ; else c++; printf ("%d\n",c); }A.0B.2C.1D.3

考题 有以下程序:includeint f(int t[],int n);main(){int a[4]={1,2,3,4},s;s=f(a,2);prin 有以下程序: #include<stdio.h> int f(int t[],int n); main() {int a[4]={1,2,3,4},s; s=f(a,2);printf("%d\n",s); } int f(int t[],int n) {if((n>0)(n<5))return t[n+1]+f(t,n-1); else return 0; } 程序运行后的输出结果是( )。A.4B.7C.10D.61

考题 以下程序的输出结果是_______。includemain(){ int i;for(i=1;i 以下程序的输出结果是_______。 #include<stdio.h> main() { int i; for(i=1;i<5;i++){ if(i%2)printf("*"); else continue; printf("#"); } printf("$\n"); }A.*#*#*#$B.#*#*#*$C.*#*#$D.#*#*$

考题 下列程序的输出结果是()。includeint fun(int x){ int a;if(x==0||x=1)return 3;elsea= 下列程序的输出结果是( )。#include<stdio.h>int fun(int x){ int a; if(x==0||x=1) return 3; else a=x-fun(x-2); return a;}void main(){ printf("%d",fun(7));}A.2B.8C.9D.5

考题 下列程序的输出结果是()。includemain(){ int a=2,b=3,p;p=f(a,b);printf("%d",p);}int 下列程序的输出结果是( )。 #include<stdio.h> main() { int a=2,b=3,p; p=f(a,b); printf("%d",p); } int f(a,b) { int c; if(a>b)c=1; else if(a==b)c=0; else c=-1; return(c) ; }A.-1B.0C.1D.2

考题 有以下程序: include int fun(int n) { if(n)return fun(n-1)+n; else return 0; } main( ) { printf("%d\n",fun(3));} 程序的运行结果是( )。 A.4B.5C.6D.7

考题 有以下程序: include main ( ) int a=3,b=4,c=5,d=2;if(a>b) if(b>c)printf("%d", 有以下程序: #include < stdio. h > main ( ) int a=3,b=4,c=5,d=2; if(a>b) if(b>c)printf("%d",d++ +1); else printf( "% d", + + d + 1 ); printf( "% d \n" ,d); 程序运行后的输出结果是( )。A.2B.3C.43D.44

考题 以下程序的输出结果是()。includeint fan(int);main(){int w=5; fun(w);printf("\n");} 以下程序的输出结果是( )。 #include <stdio.h> int fan(int); main() { int w=5; fun(w); printf("\n"); } fun(int k) { if(k>0) fun(k-1); printf("%d",k); }A.5 4 3 2 1B.0 1 2 3 4 5C.1 2 3 4 5D.5 4 3 2 1 0

考题 以下程序的输出结果是( )。 include fun() {static int a=0; a+=3;printf("%d",A); } ma 以下程序的输出结果是( )。 include<stdio.h> fun() {static int a=0; a+=3;printf("%d",A); } main() {int cc; for(cc=1;cc<5;cc++)fun(); printf("\n"); }

考题 单选题有以下程序:#include int fun(int n){ if(n)return fun(n-1)+n; else return 0;}main(){ printf(%d,fun(3));}程序的运行结果是(  )。A 4B 5C 6D 7

考题 单选题有以下程序:#include int f(int t[],int n);main(){ int a[4]={1,2,3,4},s; s=f(a,4); printf(%d,s);}int f(int t[],int n){ if(n0)return t[n-1]+f(t,n-1); else return 0;}程序运行后的输出结果是(  )。A 4B 10C 14D 6