单项选择题

有以下程序:
#include <stdio.h>
int fun()
static int x=1;
x+=1; return x;

main()
int i,s=1,
for(i=1;i<=5;i++)s+=fun();
printf("%d\n",s);

程序运行后输出的结果是( )。

A.11
B.21
C.6
D.120
<上一题 目录 下一题>
热门 试题

单项选择题
下面程序运行后输出的结果是( )。 #include stdio.h #include string.h void fun(char *s); main() char array[80]; char *p; p=array; fun(p); puts(p); void fun(char *s) strcpy(s, look );
A.s
B.1111*
C.look
D.出错
单项选择题
下面程序的输出结果是( )。 void ive(int x[],int n) int t,*p; p=x+n-1; while(x<p) t=*x; *x++=*p; *p--=t; return, main() int i,a[]=1,2,3,4,5,6,7,8,9,0; ive(a,10), for(i=0;i<10;i++) printf( %d ,a[i]); printf( n );
A.1234567890
B.0987654321
C.1357924680
D.0864297531
相关试题
  • 下面函数将指针p2所指向的线性链表串接到p...
  • 以下程序的运行结果是______。 # ...
  • 以下程序运行后输出的结果是______。...
  • 以下函数sstrcat()的功能是实现字符串的...
  • 已有定义如下: struct node int data...