填空题

下面程序的运行结果是______。
int f( int a[], int n)
if(n>1) return a[0]+f(&a[1],n-1);
else return a[0];

main ()
int aa[3]=1,2.3,s;
s=f(&aa[0],3);
printf("%d\n",s);

【参考答案】

F
<上一题 目录 下一题>
热门 试题

填空题
以下程序运行后的输出结果是______。 #include <strlng.h> main() char ch[]= abc ,x[3][4]; int i; for(i=0;i<3;i++) strcpy(x[i],ch); for(i=0;i<3;i++) printf( %s ,&x[i][i]); printf( n );
填空题
以卜函数sstrcat()的功能是实现宁符串的连接,即将t所指字符串复制到s所指字符串的尾部。例如:s所指字符串为abcd,t所指字符申为efgh,函数调用后s所指字符串为abcdefgh。请填空。 #include <string.h> void sstrcat(char *s, char *t) int n; n=strlen(s); while(*(s+n)= )s++;t++;
相关试题
  • 若fp已正确定义为—‘个文件指针,d1.dd...
  • 已有定义如下: struct node int data...
  • 以下程序巾给指针p分配三个double型动态内...
  • 以下程序用业统计文件十字符个数。请填空。...