有以下程序#include struct S{ int a;int b; };main(){ struct S a, *p=&a;a.a=99;printf( "%d\n" , __________ );}程序要求输出结构体中成员a的数据,以下不能填入横线处的内容是
A. a.a
B. *p.a
C. p->a
D. (*p).a
有以下程序#include struct STU{ char name[9]; char sex; int score[2]; } ;void f( struct STU a[] ){ struct STU b = {"Zhao", 'm', 85, 90};a[1] = b;}main(){ struct STU c[2]={ {"Qian", 'f', 95, 92}, {"Sun", 'm', 98, 99} };f(c);printf( "%s,%c,%d,%d,", c[0].name, c[0].sex, c[0].score[0], c[0].score[1] );printf( "%s,%c,%d,%d\n", c[1].name, c[1].sex, c[1].score[0], c[1].score[1] );}程序运行后输出结果是
A. Qian,f,95,92,Sun,m,98,99
B. Qian,f,95,92,Zhao,m,85,90
C. Zhao,m,85,90,Sun,m,98,99
D. Zhao,m,85,90,Qian,f,95,92
有以下程序#include typedef struct stu {char name[10];char gender;int score;} STU;void f(STU *a, STU *b){ b = a;printf("%s,%c,%d,", b->name, b->gender, b->score);}main(){ STU a={"Zhao", 'm', 290}, b={"Qian", 'f', 350};f(&a,&b);printf("%s,%c,%d\n", b.name, b.gender, b.score);}程序的运行结果是
A. Zhao,m,290,Qian,f,350
B. Qian,f,350,Zhao,m,290
C. Qian,f,350,Qian,f,350
D. Zhao,m,290,Zhao,m,290
有以下程序#include #include typedef struct stu {char name[10];char gender;int score;} STU;void f(char *name, char gender, int score){ strcpy(name, "Qian");gender = 'f';score = 350;}main(){ STU a={"Zhao", 'm', 290}, b;b=a;f(b.name,b.gender,b.score);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,Qian,m,290
B. Zhao,m,290,Zhao,m,290
C. Zhao,m,290,Qian,m,350
D. Zhao,m,290,Qian,f,350