下面程序的输出结果是( )。#include int num=10;int func(){int num=4;return ++num;}int main(){printf("%d\n",func());return 0;}
查看答案
以下程序的运行结果是( )。#include int func(int a,int b){int c;c=(a>b)?(a-b):(a+b);return(c);}int main(){int x=7,y=3;printf("%d\n",func(x,y));return 0;}
A. 3
B. 4
C. 7
D. 10
以下程序运行结果是( )。#include int main(){int max(float a,float b);float x,y;int z;x=-4.6;y=-3.7;z=max(x,y);printf("%d\n",z);return 0;}int max(float a,float b){float c;if(a>b)c=a;elsec=b;return (c);}
A. -4.6
B. -4
C. -3.7
D. -3
以下程序的运行结果是( )。#include void fun(int array[3][3]){int i=1,j;for(j=0; j<3; j++)array[j][i]++;}int main(){int j,a[3][3]= {0,1,2,1,2,4,3,5,7};fun(a);for(j=0; j<3; j++) printf("%2d",a[1][j]);printf("\n");return 0;}
A. 1 3 4
B. 1 3 5
C. 2 3 5
D. 2 3 6
有以下程序#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