题目内容

以下程序的运行结果是______。#include #include typedef struct {char name[9]; char sex; float score[2];} STU;void f(STU a){ STU b={"Zhao",'m',85.0,90.0}; int i;strcpy(a.name, b.name);

A. sex=b.sex;for(i=0;i<2;i++) a.score[i]=b.score[i];}int main(){ STU c={"Qian",'f',95.0,92.0};f(c);printf("%s,%c,%2.0f,%2.0f\n",c.name,c.sex,c.score[0],c.score[1]); }A.Qian,f,95,92
B. Qian,m,85,90
C. Zhao,f,95,92
D. Zhao,m,85,90

查看答案
更多问题

结构体中各个成员的数据类型必须是相同的。

A. 对
B. 错

有以下定义的结构体:typedef struct student{ int num; char name[10]; int age; } stu1;则,struct student 是结构体变量名。

A. 对
B. 错

Java程序需要两次处理才可以正常执行,首先对程序进行编译,然后才可以对程序进行解释执行。

A. 对
B. 错

一个Java文件,只能定义一个类。

A. 对
B. 错

答案查题题库