有如下程序:include<stdio.h>int func(int a,int b){return(a+b):}main(){int x=2,y=5,z=8,r; r
有如下程序: include <stdio.h> int func(int a,int b) { return(a+b):} main() { int x=2,y=5,z=8,r; r=func(func(x,y),z); printf("%d\n",r); } 该程序的输出结果是()。
A.12
B.13
C.14
D.15
时间:2023-08-15 17:20:35
-
有以下程序: include<stdio.h> intb=2: intfun(int*k) {b=*k+b;retum(b);} main() {in
有以下程序: include<stdio.h> intb=2: intfun(int*k) {b=*k+b;retum(b);} main() {inta[10]={1,2,3,4,5,6,7,8},i; for(i=2;i<4;i++){b=fun(&a[i])+b;printf(%d.t,b);) printf(\n); } 程序运行后的输出结果是
A.810
B.1028
C.1012
D.1016
-
如下程序执行后输出 。 include <stdio.h> int main() { static int a[3][3]; int i,j; fo
如下程序执行后输出 。 include <stdio.h> int main() { static int a[3][3]; int i,j; for (i=0;i<3;i++) for (j="0;j<3;j++)" a[i][j]="a[j][i]+i*j;" printf("%d,%d",a[1][2],a[2][1]); return 0; }>
-
有以下程序: include<stdio.h> main() { int i,j,m=55; for(i=
有以下程序: include<stdio.h> main() { int i,j,m=55; for(i=1;i<=3;i++) for(j=3;j<=i;j++)m=m%j; printf(“9/6d\n”,m); } 程序的运行结果是()。
A.0
B.1
C.2
D.3
-
有如下程序include "stdio.h"main(){ int a,b,m; for(a=5;a>=1;a--) { m=0; for(b=a;b<=5;b++) m=m+a*b; } printf("%d\n",m);}上述程序的运行结果是
A.30
B.15
C.20
D.10
-
有以下程序: include <stdio.h> main() { int a[]={10,20,30,40},*p=a,j; for(i=0
有以下程序: include <stdio.h> main() { int a[]={10,20,30,40},*p=a,j; for(i=0;i<=3;i++){a[i]=*P;p++;} printf("oAd\n",a[2]); } 程序运行后的输出结果是()。
A.30
B.40
C.10
D.20
-
如下程序的运行结果是______。 include<stdio.h> main() { int x=y=3,z=1; printf ("%d%d\n",(
如下程序的运行结果是______。 include<stdio.h> main() { int x=y=3,z=1; printf ("%d%d\n",(x,y++),z+2); }
A.3 4
B.4 2
C.4 3
D.3 3
-
有如下程序 include<stdio.h>struct group { int first, second, third; }; struct group get_min_max_sum(); } 程序运行后的输出结果是
A.min=0,max=4,sum=16
B.min=1,max=4,sum=15
C.min=1,max=9,sum=16
D.min=0,max=9,sum=17
-
有以下程序:include<stdio.h>main(){int c;while((c=getchar())!='\n'){switch(c-'3'){case 0:c
有以下程序: include<stdio.h> main() {int c; while((c=getchar())!='\n') {switch(c-'3') {case 0: case 1:putchar(c+4); case 2:putchar(c+4);break; case 3:putchar(c+3); case 4:putchar(c+3);break; }} printf("\n");} 从第一列开始输入数据(<CR>代表…个回车符):3845<CR>,则狴序输出结果为()。
A.77889
B.77868
C.776810
D.7.78866e+007
-
有以下程序: include<stdio.h> int f(int t[],int n); main() {int a[4]={1,2,3,4
有以下程序: include<stdio.h> int f(int t[],int n); main() {int a[4]={1,2,3,4},s; s=f(a,4);printf("%d\n",s); int f(int t[],int n) {if(n>0)return t[n-1]+f(t,n-1); else return 0; } 程序运行后的输出结果是()。
A.4
B.10
C.14
D.6
-
有以下程序: include<stdio.h> main() { int a; scanf("%d",&a); if(a++<9
有以下程序: include<stdio.h> main() { int a; scanf("%d",&a); if(a++<9)printf("%d\n",a); clsc printf("%d\n",a--); } 程序运行时从键盘输入9<回车>,则输出结果是()。
A.10
B.11
C.9
D.8
-
有以下程序 include <stdio.h> include <stdlib.h> int fun(int n) {int *p; p=(int*)malloc(sizeof(int)); *p=n; return *p; } { int a; a=fun(10); printf("%d\n",a+fun(10)); } 程序的运行结果是______。
A.0
B.10
C.20
D.出错
-
有如下程序:include<stdio.h>main(){int x=23; do {Printf("%d",x--);} while(! x);}该程序的执
有如下程序: include <stdio.h> main() { int x=23; do { Printf("%d",x--);} while(! x); } 该程序的执行结果是()。
A.321
B.23
C.不输出任何内容
D.陷入死循环
-
有以下程序: include<stdio.h> int f(int x); main() { int a,b=0; for(a=0;a<
有以下程序: include<stdio.h> int f(int x); main() { int a,b=0; for(a=0;a<3;a++) { b=b+f(a);putchar(A+b);} } int f(int x) { return x * x1; } 程序运行后的输出结果是()。
A.ABE
B.BDI
C.BCF
D.BCD
-
有以下程序: include <stdio, h>void swap1 (int c0[],int e1[] ){intt;t = c0[0]; c0[0]: c1 [
有以下程序: include <stdio, h>void swap1 (int c0[],int e1[] ){ int t; t = c0[0]; c0[0]: c1 [0] ; c1 [0] = t;}void swap2(int * c0,int * c1){ int t; t= *c0; *c0= *c1; * c1 =t;}main(){ inta[2]={3.5}.b[2]={3,5}; swapl(a,a+1) ;swap2(&b[0],&b[1]); printf("% d %a %d %d \n" ,a[0] ,a[1] ,b[0] ,b[1] ); }程序运行后的车出结果是()。
A.3 5 5 3
B.5 3 3 5
C.3 5 3 5
D.5 3 5 3
-
有以下程序: include<stdio.h> void func(int n) { static int num=1); num=num+n;pri
有以下程序: include<stdio.h> void func(int n) { static int num=1); num=num+n;printf("%d",num); } main() { funo(3);func(4);printf("n"); } 程序运行后的输出结果是()。
A.4 8
B.3 4
C.3 5
D.4 5
-
有以下程序:include <stdio, h>void sum(int a[ ] ){a[0]=a[-1] +a[1];}main (){int a[10] = {
有以下程序:include <stdio, h>void sum(int a[ ] ){ a[0]=a[-1] +a[1];}main (){ int a[10] = {1,2,3,4,5,6,7,8,9,10}; sum(&a[2]); prinff("% d \n",a[2]); }程序运行后的输出结果是()。
A.6
B.7
C.5
D.8
-
"给定一个C程序的代码如下所示,则编译运行后,输出结果是()include ""stdio.h""int sum(){ int a=5,b=6;printf(""%d\n"",a+b);}void main(){sum();}
A.11
B.0
C.1
D.10
-
下面程序中,x被分配---释放存储空间,总共有()次这样的过程。 include <stdio.h> void proc (int a); int
A.1
B.2
C.3
D.0
-
有以下程序 include<stdio.h>include<string.h>typedef struct stu { char name[10]; char gender; int score; } STU; void f(); } 程序的运行结果是
A.Zhao,m,290,Zhao,m,290
B.Zhao,m,290,Qian,m,290
C.Zhao,m,290,Qian,m,350
D.Zhao,m,290,Qian,f,350
-
有以下程序includ<stdio.h>main(){ int a;(int)(-1.53*3);printf("%"a);}程序的运行结果是()
A.-3
B.-4
C.-5
D.结果不确定
-
有以下程序: include<stdio.h> main() } int y=9; for(y>0;
有以下程序: include<stdio.h> main() } int y=9; for(y>0;y--) if(y%3==0)printf(“%d”,--y); } 程序的运行结果是()。
A.741
B.963
C.852
D.875421
-
13、如下程序的执行结果是 include<stdio.h> int main() { int a[ ][4]={1,3,5,7,9,11,13,15,17,19,21,23}; int (*p)[4],i=1,j=2; p=a; printf("%d\n",*(*(p+i)+j)); return 0; }
A.13
B.9
C.11
D.17
-
有以下程序段,在空白处填入(),可以使程序正确运行。 include <stdio.h> int (int x,int y)
有以下程序段,在空白处填入(),可以使程序正确运行。 include <stdio.h> int (int x,int y) {if(x>y)return &x; else return &y; } main() {int a=3,b=5,*p; p=f(a,b); printf("%d",*p); }
A、f
B、*f
C、(*f)
D、其余选项都不对
-
以下程序的输出结果是()include <stdio.h> int fun(int x)
A.2
B.3
C.7
D.0