以下程序的运行结果为________。#include"stdio.h"intx=2;intfun(intp){staticintx=3;x+=p;printf("%d",x);return(x);}voidmain(){inty=3;printf("%d",fun(fun(x)));}
举一反三
- 以下程序的输出结果是 ( ) 。# include <;stdio.h>;void fun(int x){if(x/2>;0)fun(x/2);printf("%d",x);}main(){fun(3);printf("\n");}
- #include <;stdio.h>;int fun(int x);int main(){ printf("%d",fun(4)); return 0;}int fun(int x){ if(x==1)return 3; return x*x+fun(x-1);}程序输出结果为( )
- 以下程序的运行结果是( )。#include <;stdio.h>;void fun(int x){ if(x/2>;0) fun(x/2-2);printf("%d ",x);}int main(){fun(20);return 0;}
- 以下程序的运行结果是()。#include"stdio.h"voidfun(intx,inty){x=x+y;y=x-y;x=x-y;}main(){intx=2,y=3;fun(x,y);printf("%d,%d",x,y);} A: 3,2 B: 2,3 C: 5,2 D: 5,3
- 有以下程序 #include <stdio.h> void fun(int x) {if(x/2>1) fun(x/2); printf("%d",x); } main() {fun(7); printf(" ");} 程序运行后的输出结果是: