单项选择题
有以下程序
#include <stdio.h>
int fun()
{
static int x=1;
x+=1;
return x;
}
main()
{
int i,8=1;
for(i=1;i<=5;i++)s+=fun();
printf("%d\n",s);
}
程序运行后的输出结果是______。
A.21
B.11
C.6
D.120
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
单项选择题
有以下程序(注:字母A的ASCII码值是65)#include <stdio.h>void fun(char *s){ while(*s){ if(*s%2) printf( %c ,*s);s++;}}main(){ char a[]= BYTE ;fun(a);printf( n );}程序运行后的输出结果是______。
A.YT
B.BT
C.YE
D.BY
点击查看答案&解析
单项选择题
有以下程序#include <stdio.h>#include <string.h>main(){ char p[20]={ a , b , c , d },q[]= abc ,r[]= abcde ;strcat(p,r); strcpy(p+strlen(q),q);printf( %d n ,strlen(p));}程序运行后的输出结果是______。
A.6
B.9
C.11
D.7
点击查看答案&解析
相关试题
有三个关系R,S和T如下: RABCa12b21c...
有以下程序#include <stdio.h>main(...
以下叙述中错误的是______。
若有以下程序段int r=8;printf( %d...
有以下程序#include <stdio.h>#defin...