有以下程序
#include
#include
typedef struct stu {
char name[10];
char gender;
int score;
} STU;
void f(STU c)
{ strcpy(c.name, "Qian");
c.gender = 'f';
c.score = 350;
}
main()
{ STU a={"Zhao", 'm', 290}, b;
b=a;
f(b);
printf("%s,%c,%d,", a.name, a.gender, a.score);
printf("%s,%c,%d\n", b.name, b.gender, b.score);
}
程序的运行结果是
- A.Zhao,m,290,Zhao,m,290
- B.Zhao,m,290,Qian,m,290
- C.Zhao,m,290,Qian,m,350
- D.Zhao,m,290,Qian,f,350
热度🔥811
解析:打开微信小程序查看本题解析