以下程序的运行结果是_______。 int a=2,b=3; int min(int a,int b) { int c; c=aA: 2,3
B: 2
C: 3
D: 4
B: 2
C: 3
D: 4
举一反三
- 以下程序运行后的输出结果是。 #define PR(int) printf("int=%d\n",int) main { int x=1,y=1,z=1; x+=y+=z; PR(x<y?x:y); PR(x<y?x++:y++); PR(x); PR(y); PR(z+=x<y?x++:y++); PR(y); }: int=2 int=2 int=3 int=3 int=4 int=4|int=3 int=2 int=3 int=3 int=4 int=3|int=3 int=2 int=3 int=3 int=4 int=4|int=4 int=2 int=3 int=3 int=4 int=4
- 下列程序的运行结果为:( ) #include int main() { int a = 3,b = 8,c = 9,d = 2,e = 4; int min; min = (a < b) ? a : b; min = (min < c) ? min : c; min = (min < d) ? min : d; min = (min < e) ? min : e; printf("Min is%d\n",min); }
- 下面程序的运行结果是_______。#include<stdio.h>int main( ){ int f1( int x , int y ) ;int a = 11 , b = 12 ,c ;c = f1( a , b ) ;printf( "a=%d,b=%d,c=%d\n" , a , b ,c ) ;return 0 ;}int f1( int x , int y ){ int f2( int , int ) ;int c ;x = x * 2 ;y = y * 2 ;c = f2( x , y ) ;return c*2 ;} int f2( int a , int b ){int c ;c = ( a + b ) % 3 ;return c ;}
- 下列程序的运行结果是?#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
- 以下程序的运行结果是:#include <;stdio.h>;int a=3, b=5;int max(int a, int b){int c;c=a>;b?a:b;return c;}int main(){int a=8;printf("%d\n", max(a, b));return 0;} A: 8 B: 5 C: 3 D: 0