题目内容
以下程序中,函数fun()的功能是:统计结构体person数组中所有性别(sex)为'M'的记录个数,存入n变量中,并作为函数值返回。#include typedef struct{int no;char name[10];char sex;}S;int fun( (1) x[]){int i,n=0;for(i=0;i<3;i++)if((2))n++;return (3);}int main(){S x[3]={{1,"AAA",'M'},{2,"BBB",'F'},{3,"CCC",'M'}};int n;n=fun(x);printf("n=%d\n",n);return 0;}
查看答案
搜索结果不匹配?点我反馈
更多问题