• 2022-06-09
    若有以下定义,则下列赋值语句中不正确的是( )。struct student { int num; char name[20]; }st,*p=&st;
    A: st.num=1001;
    B: st.name="Jack";
    C: (*p).num=1002;
    D: p->;num=1003;
  • B
    本题目来自[网课答案]本页地址:https://www.wkda.cn/ask/zooteoxejoaxooo.html

    内容

    • 0

      已知: struct st{ int num; char sex; float score; }stud,*p=&stud; 则对于结构体变量stud的成员num正确的引用是____。 A: stud->num B: st.num C: p->num D: p.num

    • 1

      若已定义:struct Student {int num; char name[20];}stu,*p; p=&stu;,要访问stu中的num成员,可使用【】。 A: *stu.num B: p->;num C: stu->;num D: p.num

    • 2

      若有以下定义和语句:struct student { int age,num ; }; struct student stu[3]={{1001,20},{1002,19},{1003,21}}; int main() { struct student *p=stu; … }则以下正确的引用是()。 A: (p++)->num B: ++p->num C: (*p).num D: p->num

    • 3

      已知:[br][/br] struct st { int num; char sex; float score; }stud,*p=&stud; 则对于结构体变量stud的成员num正确的引用是______。 A: stud->num B: st.num C: p->num D: p.num

    • 4

      以下变量定义,错误的是: A: struct student{int num, char name[20];} s; B: struct {int num, char name[20];} s; C: struct student{int num, char name[20];}; struct student s; D: struct student{int num, char name[20];} ; student s