以下程序运行结果是( )。 #include #define f(x) x*x*x void main() { int a = 3,s,t; s = f(a+1); t = f((a+1)); printf("%d,%d\n",s,t); }
A. 10,64
B. 10,10
C. 64,10
D. 64,64
查看答案
写出下列程序的输出结果()。#include int fun(int x){static int t = 0;return ( t += x);}void main( ){int s, i;for(i = 1;i<=5; i++)s = fun(i);printf("%d\n",s);}
写出下列程序的输出结果()。#include void fun1( ){int x=5;printf("x=%d\n",x);}void fun2(int x){printf("x=%d\n", ++x);}void main( ){int x=2;fun1( );fun2(x);printf("x=%d\n", x);}
写出下列程序的输出结果是()。#include int a = 5;void fun(int b){int a = 10;a += b;printf("%d\n",a);}void main( ){int c = 20;fun(c);a += c;printf("%d\n", a);}
写出下列程序的输出结果是()。#include int fun(int n){if(n==1)return 1;elsereturn fun(n-1)+1;}void main( ){int i,j=0;for(i=1;i<4;i++)j += fun(i);printf("%d\n", j);}