struct info{
int no;
double ave;
char gender;
char name[10];
}stu;
举一反三
- 在如下结构体中,不正确的是( )。 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;
- 对结构体类型变量定义不正确的是( )。 A: B: define STUDENT struct studentSTUDENT{char name;int num;}std; C: struct student{char name;int num;}stu; D: E: define struct student{char name;int num;}STD;STD stu; F: struct{char name;int num;}student;struct student stu;
- 中国大学MOOC: 有结构体STU如下:struct STU{char name[20];char number[10];int score;};stu是STU类型的变量。下列实参和形参的结合哪项是正确的?
- 有如下结构体定义,能够正确引用结构体的是()。 struct student { long num; char name[10]; char sex; int age; float score; }stu;
内容
- 0
在如下结构体定义中,不正确的是()。 A: struct teacher{ int no; char name[10]; float salary;}; B: struct tea[20]{ int no; char name[10]; float salary;}; C: struct teacher{ int no; char name[10]; float salary; }tea; D: struct{ int no; char name[10]; float salary; }tea;
- 1
在如下结构体定义中,不正确的是○。 A: struct student { int no; char name[10]; float score; } B: struct stud[20] { int no; char name[10]; float score; } C: struct student { int no; char name[10]; float score; }stud[20]; D: struct{int no;char name[10];float score;}stud[100];
- 2
设有一结构体类型变量定义如下: struct date { int year; int month; int day; }; struct worklist { char name[20]; char sex; struct date birthday; } person; 若对结构体变量person的出生年份进行赋值时,下面正确的赋值语句是
- 3
设有一结构体类型变量定义如下,若对结构体变量w1的出生年份year进行赋值,下面正确的赋值语句是( )。 struct date { int year; int month; int day; }; struct worker { char name[20]; char sex; struct date birthday; }w1;
- 4
设有一结构体类型变量定义如下: struct date { int year; int month; int day; }; struct worker { char name[20]; char sex; struct date birthday; }w1; 若对结构体变量 w1的出生年份进行赋值,下面正确的赋值语句是( )