A.3
B.5
C.6
D.8
[单选题]阅读下列程序段,则程序的输出结果为 #include"stdio.h" #defineM(X,Y)(X)*(Y) #defineN(X,Y)(X)/(Y) main() {f int a=5,b=6,c=8,k; k=N(M(a,b),c); printf("%d/n",k);}A.3B.5C.6D.8
[单选题]阅读下列程序段,则程序的输出结果为#include "stdio.h"#define M(X,Y)(X)*(Y)#define N(X,Y)(X)/(Y)main(){ int a=5,b=6,c=8,k;k=N(M(a,b),c);printf("%d/n",k);A.3B.5C.6D.8
[单选题]阅读下列程序段#include "stdio.h"typedef struct aa{ int a;struct aa *next; } M;void set(M *k,int i,int *b){ int j,d=0;for(j=1;j <i;j++){ k[j-1].next=&k[j];k[j-1].a=b[d++]; }k[j].a=b[d]; }main(){ M k[5],*p;int d[5]={23,34,45,56,67};set(k,5,d);p=k+1;p
[单选题]阅读下面程序,则输出结果是#include "stdio.h"void fun(int *a,int *b){int c=20,d=25;*a=c/3;*b=d/5;}main(){ int a=3,b=5;fun(&a,&b);printf("%d,%d\n",a,b);}A.6,5B.5,6C.20,25D.3,5
[单选题]阅读下列程序,程序的输出结果是#include "stdio.h"main(){int m,n;float k;for(m=6;m>2;m--){ k=0;for(n=m;n>1;n--)k=k+m*n;}printf("%f\n",k);}A.5.000000B.15.000000C.25.000000D.35.000000
[单选题]阅读下列程序,则运行结果为 #include"stdio.h" fun() { static int x=5; x++; return x;} main() { int i,x; for(i=0;i<3;i++) x=fun(); printf("%d/n",x);}A.5B.6C.7D.8
[主观题]阅读下面程序,则程序的执行结果为 (10) 。#include "stdio.h"main(){int a=30,b=20,z;z=fun(a+b,a-b);printf("%d\n",z);}fun(int a,int b){int z;z=a/b;return z;}
[主观题]阅读下面程序,则程序的执行结果为(19)。#include "stdio.h"fun(int k,int *p){ int a,b;if(k==1||k==2)*p=1;else{ fun(k-1,&a);fun(k-2,&b);*p=a+b;}}main(){ int x;fun(6, &x);printf( "%d\n",x);}
[主观题]阅读下面程序,则程序的执行结果为 (10) 。#include "stdio.h"main(){ int a=10;fun(a);printf( "%d\n",a);}fun(int x){ x=50;}
[单选题]阅读下面程序段,则执行后的结果为#include "stdio.h"main(){int m=4,n=2,k;k=fun(m,n);printf("%d\n",k);}fun(int m,int n){return(m*m*m-n*n*n);}A.64B.8C.56D.0