单项选择题

有下列程序:
fun(int x,int y)
static int m=0,i=2;
i+=m+1;m=i+x+y;return m;
main()
int j=1,m=1,k;
k=fun(j,m);printf("%d,",k);
k=fun(j,m);printf("%d\n",k);
执行后的输出结果是( )。

A.5,5
B.5,11
C.11,11
D.11,5
<上一题 目录 下一题>
热门 试题

单项选择题
下列程序的运行结果为( )。 #include<stdio.h> void abc(char*str) int a,b,i,j; for(i=j=0;str[i]!=’ 0’;i++) if(str[i]!=’a’) str[j++]=str[i]; str[j]=’ 0’; void main() char str[]= abcdef ; abc(str); printf( str[]%s ,str);
A.str[]=bcdef
B.str[]=abcdef
C.str[]=a
D.str[]=ab
单项选择题
下列程序的输出结果是( )。 #include<stdio.h> main() int a=2,b=3,p; p=f(a,b); printf( %d ,p); int f(a,b) int c; if(a>b)c=1; else if(a==b)c=0; else c=-1; return(c) ;
A.-1
B.0
C.1
D.2
相关试题
  • 下列程序中的数组a包括10个整数元素,分...
  • 语句“int(*ptr)();”的含义是___...
  • #define命令出现在程序中函数的外面,宏名...
  • 下列程序段的运行结果是______。 ch...
  • 下列程序的输出结果是______。 #in...