以下程序段,在空白处填写()能使程序正确运行并输出结果。
#include
struct student
{long num;
char name[10];
char sex;
float score;
};
main()
{struct student stu={10101,"lili
#include
struct student
{long num;
char name[10];
char sex;
float score;
};
main()
{struct student stu={10101,"lili
举一反三
- 以下程序段,在空白处填写()能使程序正确运行并输出结果。 #include struct student {long num; char name[10]; char sex; float score; }; main() {struct student stu={10101,"lili",'m',89.5},*pt; printf("%.2f",pt->score); }
- 有以下程序段,输出结果为()。 #include<stdio.h> struct student {int num; char name[20]; float score; }; main() {struct student stu[5]; printf("%d",sizeof(stu)); }
- 以下对结构体类型的变量定义中不正确的是 。 A: B: define STUD struct student STUD {long num; char name[20]; char sex; float score;}; STUD stud1,stud2; C: struct student {long num; char name[20]; char sex; float score; }stud1,stud2; D: struct {long num; char name[20]; char sex; float score; } stud1,stud2; E: struct {long num; char name[20]; char sex; float score; }student;struct student stud1,stud2;
- 在如下结构体中,不正确的是( )。 A: struct student {char name[10]; float score; }; B: struct stu[5] {char name[10]; float score; }; C: struct student {char name[10]; float score; } stu[5]; D: struct {char name[10]; float score; }stu[5];
- 以下结构体的定义语句中,正确的是______。? struct student {int num; char name[10];int age;}stu;|struct {int num; char name[10];int age;}student; struct student stu;|struct student {int num; char name[10]; int age;}; student stu;|struct student {int num; char name[10];int age;};stu;