题目内容

有以下程序#include #define N 4void fun(int a[][N],int b[], int flag ){int i,j;for(i=0; ia[j][i]):(b[i]

A. 1 2 3 4 13 14 15 16
B. 1 5 9 13 4 8 12 16
C. 13 14 15 16 1 2 3 4
D. 4 8 12 16 1 5 9 13

查看答案
更多问题

有以下程序#include void fun(int a[],int n){int t,i,j;for(i=0; ia[j]){t=a[i];a[i]=a[j];a[j]=t;}}int main(){int c[10]= {10,9,8,7,6,5,4,3,2,1},i;fun(c,10);for(i=0; i<10; i++) printf("%d,",c[i]);printf("\n");return 0;}则程序的输出结果是____________

A. 10,9,8,7,6,5,4,3,2,1,
B. 1,10,3,8,5,6,7,4,9,2,
C. 10,1,8,3,6,5,4,7,2,9,
D. 2,9,4,7,6,5,8,3,10,1,

有以下程序#includeint fun(int a,int b){return a+b;}int main(){int x=6,y=7,z=8,r;r=fun(fun(x,y),z--);printf("%d\n",r);return 0;}程序运行后的输出结果是

A. 15
B. 20
C. 21
D. 31

以下程序的运行结果是 。#include f(int a[]){int i=0;while(a[i]<=10){printf("%3d",a[i]);i++;}}int main(){int a[]= {1,5,10,9,11,7};f(a+1);return 0;}

下面程序的运行结果是______。#include long fib(int g){switch(g){case 0:return 0;case 1:case 2:return 1;}return(fib(g-1)+fib(g-2));}int main(){long k;k=fib(7);printf("k=%d\n",k);return 0;}

答案查题题库