• 2022-06-11
    以下对结构变量stu1中成员age的非法引用是( )。struct student{ int age;int num;}stu1,*p;p=&stu1;
    A: .(*p).age
    B: stu1.age
    C: p->age
    D: student.age
  • D

    内容

    • 0

      以下对结构体变量stu1中成员age的正确引用是()。 struct student { char name[10]; int age ; } stu1 ,*p; p=&stu1;

    • 1

      以下对结构体变量stu1中成员age的非法引用是( )。 A: stu1.age B: student.age C: p->;age D: (*p).age

    • 2

      若有定义:struct student{ int age; int num;};struct student stu,*p;则以下正确的赋值语句是()。 A: p=stu; B: *p=*stu; C: *p=&stu; D: p=&stu;

    • 3

      以下结构体的定义语句中,正确的是______。? 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;

    • 4

      struct student{ int age; char num[8];};struct student stu[3]={{20,"200401"},{21,"200402"},{19,"200403"}};struct student *p=stu;以下选项中引用错误的是___ __。 A: (p++)->;num B: p->;num C: (*p).num D: stu[3].age