填空题

下面程序的运行结果是 【12】 。
#include <stdio.h>
fun(int t[],int n)
int i,m;
if(n==1) return t[0];
else
if(n>=2) | m:fun(t,n-1); return m;
main( )
int a[ ] = 11,4,6,3,8,2,3,5,9,2;
printf( "% d \n" ,fun( a, 10));

【参考答案】

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

填空题
以下程序的输出结果是 【9】 。 #include <stdio.h> main ( ) int a[3][3] =1,2,9,3,4,8,5,6,7 ,i,s=0; for(i=0;i<3;i++) s+ =a[i][i] + a[i][3-i-1]; pfintf( % d n ,s);
填空题
以下函数fun的功能是返回str所指字符中中以形参c中字符开头的后续字符串的首地址,例如:str所指字符串为“Hello!”,c中的字符为’e’,则函数返回字符串 ello! 的首地址。若 str所指字符串为空中或不包含c中的字符,则函数返回NULL。请填空。 char *fun (char *str,char c) int n=0;char*p=str; if(p!=NULL) while(P[n]! =c&&p[n]! =’ 0’)n++; if(p[n]==’ 0’)retum NULL; return( 【8】 );
相关试题
  • 以下程序中函数fun()的功能是构成一个如...
  • 当运行以下程序时,输入abcd,程序的输出结...
  • 以下程序用于判断a,b,c能否构成三角形,...
  • 以下程序的功能是:输出100以内(不含1...
  • 若变量a,b已定义为int类型并分别赋值21...