填空题

以下程序中,for循环体执行的次数是 【13】 。
#define N 2
#define M N+1
#define K M+1*M/2
main()
int i;
for(i=1;i<K;i++)
…
…

【参考答案】

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

填空题
以下函数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]!=’ O’)n++; if(p[n]=’ 0’) return NULL; return( 【12】 );
填空题
以下程序的输出结果是 【14】 。 main() int x=0; sub(&x,8,1); printf( %d n ,x); sub(int *a,int n,int k) if(k<=n)sub(a,n 2,2*k); *a+=k;
相关试题
  • 有以下程序: mam() int i=10,j=...
  • 有以下程序: mam() char s[]= AB...
  • 有以下函数: fun(char *a, char *...
  • 有以下程序: fun(int x) int p; i...
  • 有以下程序: void fun1(char*p) ch...