• 2022-06-03
    以下scanf函数调用语句中对结构体变量成员的不正确引用是()
    A: scanf("%s",s[0].name);
    B: scanf("%d",&s[0].age);
    C: scanf("%d",&(p->sex));
    D: scanf("%d",p->age);
  • D
    本题目来自[网课答案]本页地址:https://www.wkda.cn/ask/ypompazjoatepjo.html

    内容

    • 0

      以下scanf函数调用语句中对结构体变量成员的不正确引用是( ). struct pupil { char name[20]; int age; int sex; } pup[5],*p; p=pup;

    • 1

      有以下结构体说明、变量定义和赋值语句 struct STD { char name[10]; int age; char sex; } s[5],*ps; ps=&s[0]; 则以下scanf函数调用语句有错误的是________

    • 2

      已有定义 char s; 使用scanf( )函数输入一个字符给变量s,不正确的函数调用是(  )。 A: scanf("%c",&s) ; B: scanf("%d",&s) ; C: scanf("%u",&s) ; D: scanf("%lf",&s) ;

    • 3

      设有如下定义: struct st{ char name[12]; int age; char sex; }stu[10],*p=stu;以下语句错误的是( )。 A: scanf("%d",p->age); B: scanf("%s",std[0].name); C: scanf("%d",&std[1].age); D: scanf("%c",&(p->sex);

    • 4

      若有定义“chars[20],ch;”,则下列输入语句正确的是()。 A: scanf("%s",s); B: scanf("%s",&s); C: scanf("%c",s[0]); D: scanf("%c",ch);