填空题
以下程序运行后的输出结果是______。
#include
char*ss(char*s)
char*p,t;
P=s+1;t=*s;
while(*p) *(P-1)=*P;P++;
*(P-1)=t;
return s;
main()
char*p,str[10]="abcdefgh";
p=ss(str);
printf("%s\n",p);
【参考答案】
bcdefgha
点击查看答案&解析
<上一题
目录
下一题>
热门
试题
填空题
以下程序中函数fun的功能是:统计person所指结构体数组中所有性别(sex)为M的记录的个数,存入变量n中,并作为函数值返回。请填空: #include<stdio.h> #define N 3 typedef struct int mum,char name[10];char sex;SS; int fun(SS person[]) int i,n=0; for(i=0;i<N;i++) if(______==’M’)n++; return n; main() SS W[N]=1,’AA’,’F’,2,’BB’,’M’,3,’CC’,’M’;int n; n=fun(W);printf( n=%d n ,n);
点击查看答案&解析
填空题
j+1
点击查看答案
相关试题
i%2或i%2==1