以下只有在使用时才为该类型变量分配内存的存储类说明是()。
A. auto和static
B. auto和register
C. register和static
D. extern相register
有以下程序,程序运行后的输出结果是()。float fun (int x, int y){ return (x + y) ; }void main ( ){int a=2, b=5, c=8;printf ("%3.0f\n", fun((int) fun (a + c,b),a - c));}
A. 编译出错
B. 9
C. 21
D. 9.0
下列程序执行后的输出结果是()。char st [ ] = "hello, friend! ";void funcl (int i){printf ("%c", st [i] ) ;if (i < 3) { i += 2; func2 (i); }}void func2 (int i){Printf(“%c”,st [i] ) ;if (i < 3) { i+=2; func1(i) ; }}void main ( ){int i = 0; func1(i);printf ("\n");}
A. hello
B. hel
C. hlo
D. hlm
有以下程序,程序运行后的输出结果是()。int f (int n){if (n == 1) return 1;else return f(n-1) +1;}void main ( ){int i, j = 0;for (i=1;i<3;i++) j+=f(i);printf ("%d\n", j) ;}
A. 4
B. 3
C. 2
D. 1