题目内容

有以下程序 #include int f(int t[], int n); main() { int a[4]={1,2,3,4},s; s=f(a,4); printf("%d\n",s); } int f(int t[],int n) { if(n>0) return t[n-1]+f(t,n-1); else return 0; }

A. 10
B. 14
C. 4
D. 6

查看答案
更多问题

有以下程序 #include #define N 4void fun(int a[][N], int b[]){ int i;for(i=0; i

A. l,2,3,4,
B. 1,0,7,0,
C. 1,4,5,9,
D. 3,4,8,10,

以下程序的功能是:通过函数 func 输入字符并统计输入字符的个数。输入时用字符@作为输入结束标志。请填空。#include long ; /* 函数说明语句 */main(){ long n;n=func(); printf("n=%ld\n",n);}long func(){ long m;for( m=0; getchar()!='@'; );return m;}

以下程序的输出结果是#include int fun(int x){ static int t=0;return(t+=x);}main(){ int s,i;for(i=l;i<=5;i++)s=fun(i);printf("%d\n",s);}

运动部件的( )对伺服机构的启动和制动特性都有影响,尤其是处于高速运转的零、部件。

A. 摩擦力
B. 惯量
C. 调速范围

答案查题题库