以下程序的运行结果是( )。#include [stdio.h]int f(int m, int n){ return m > n ? m : n;}main(){ int x = f(5, 3); printf("%d\n", x);}
举一反三
- 以下程序运行后的输出结果是________。 #include "stdio.h" int f(int x); void main() { int n=1,m; m=f(f(f(n))); printf("%d",m); } int f(int x) {return x*2;}: 1/#/2/#/4/#/8
- 下列程序的运行结果是?#include [stdio.h] int f(int n); int main() { printf("%d\n", f(f(f(f(1))))); return 0; } int f(int n) { return n + 1; } A: 5 B: 4 C: 3 D: 2
- 以下程序中,运行结果是36的有()。 A: include <stdio.h> B: define M(y) y*y int main() { printf("%d\n",M(6+0)); return 0; } C: include <stdio.h> D: define M(y) (y)*(y) int main() { printf("%d\n",M(6+0)); return 0; } E: include <stdio.h> int M(int y) { return y*y; } int main() { printf("%d\n",M(6+0)); return 0; } F: include <stdio.h> int M(int y) { return (y)*(y); } int main() { printf("%d\n",M(6+0)); return 0; }
- 有以下程序 #include int m=12; int fun( int x,int y ) { static int m=3; m= x * y - m ; return (m); } main() { int a=7, b=5; m=fun( a, b )/m; printf("%d\n", fun( a, b )/m ); } 程序运行后的输出结果是
- 下列程序的输出结果是(). int fun3(int x) { static int a=3; a+=x; return(a); } int main(void) { int k=2,m=1,n; n=fun3(k);n=fun3(m); printf("%d\n",n); return 0; }