题目内容

以下程序的运行结果是()。#include int fun(int a[4][4]){int i;for(i=0; i<4; i++)printf("%2d",a[i][2] );printf("\n");}int main(){int a[4][4]= {1,1,2,2,1,9,0,0,2,4,2,0,0,5,0,8};fun(a);return 0;}

A. 1 9 0 5
B. 2 4 2 0
C. 2 0 2 0
D. 2 0 0 8

查看答案
更多问题

以下程序运行后输出结果是( )。#include int fun(int a, int b){return(a-b);}int main(){int x=5,y=3,k;k=fun(x,y);printf("%d-%d=%d\n",x,y,k);return 0;}

A. 0
B. 2
C. 5-3=2
D. x-y=2

以下程序运行后输出结果是( )。#include int a=2,b=3,c=5;int fun(int a, int b){int c;c=a>b?a:b;return(c);}int main(){int a=6;printf("%d",fun(fun(a,b),c));return 0;}

A. 5
B. 6
C. 3,5
D. 5,6

以下程序运行后输出结果是( )。#include void fun(int i){int m=2;m=i++;printf("%d ",m);}int main(){int m=7,n=5;fun(n);printf("%d",m);return 0;}

A. 5 5
B. 6 6
C. 5 7
D. 6 7

下面程序的输出结果是( )。#include int num=10;int func(){int num=4;return ++num;}int main(){printf("%d\n",func());return 0;}

A. 1
B. 4
C. 5
D. 10

答案查题题库