网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)

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

A.scanf("%s",s[0].name);

B.scanf("%d",&s[0].age);

C.scanf("%c",&(ps->sex));

D.scanf("%d",ps->age);


参考答案和解析
A ps一>age不是地址,不能用于scanf函数中。所以选择A)。
更多 “有以下结构体说明、变量定义和赋值语句 struct STD { char name[10]; int age; char sex; } s[5],*ps; ps=s[0]; 则以下scanf函数调用语句有错误的是()A.scanf("%s",s[0].name);B.scanf("%d",s[0].age);C.scanf("%c",(ps->sex));D.scanf("%d",ps->age);” 相关考题
考题 有以下结构体说明、变量定义和赋值语句struct STD{ char name[10];int age;char sex;} s[5],*ps;ps=s[0];则以下 scanf 函数调用语句中错误引用结构体变量成员的是A)scanf("%s",s[0].name);B)scanf("%d",s[0].age);C)scanf("%c",(ps-sex));D)scanf("%d",ps-age);

考题 ( 38 )有以下定义和语句struct workers{ int num;char name[20];char c;struct{ int day; int month; int year; } s;} ;struct workers w,*pw;pw = w;能给 w 中 year 成员赋 1980 的语句是A ) *pw.year = 198O;B ) w.year=1980;C ) pw-year=1980;D ) w.s.year=1980;

考题 有以下结构体说明、变量定义和赋值语句 struct STD { char name[10]; int age; char sex; }s[5],*ps; ps=s[0]; 则以下scanf函数调用语句中错误引用结构体变量成员的是______。A.scanf("%s",s[0].name);B.scanf("%d",s[0].age);C.scanf("%c",(ps->sex));D.scanf("%d",ps->age);

考题 以下scanf函数调用语句中对结构体变量成员的引用不正确的是struct pupil{ char name[20];int ageint sex;} pup[5],*p;p=pup;A.scanf("%s",pup[0].name);B.scanf("%d",pup[0].age);C.scanf("%dT",(p-sex));D.scanf("%d",p-age);

考题 有以下结构体说明,变量定义和赋值语句: struct STD {char name[10]; int age; char ***; }s[5],*ps; ps=&s[0]; 则以下scanf函数调用语句中错误的结构体变量成员是( )。A.scanf("%s",s[0].name);B.scanf("%d",&s[0].age);C.scanf("%c",&(ps->***));D.scanf("%d",ps->age);

考题 有以下说明和定义语句 struct student {int age;char num[8]; }; struct student stu[3]={{20,"200401"},{21,"200402"},{10\9,"200403"}}; struct student*p=stu;以下选项中引用结构体变量成员的表达式错误的是______。A.(p++)->numB.p->numC.*p.numD.stu[0].age

考题 设有如下定义 struct ss { char name[10]; int age; char sex; } std[3],* p=std; 下面各输入语句中错误的是A.scanf("%d",(*p).age);B.scanf("%s",std.name);C.scanf("%c",std[0].sex);D.scanf("%c",(p->sex));

考题 设有以下语句: typedef street S { int g; char h;} T;则下面叙述中正确的是( )。A.可用S定义结构体变量B.可以用T定义结构体变量C.S是struct类型的变量D.T是struct S类型的变量

考题 设有以下语句: typedef struct S { int g; char h; } T; 则下面叙述中正确的是( )。A.可以用S定义结构体变量B.可以用T定义结构体变量C.S是struct类型的变量D.T是stnictS类型的变量

考题 有以下定义和语句: struct students {int num;char name[20];char c; struct {int grade1;int grade2;}s; }; struct students w,*pw; *pw=w; 下列赋值语句不正确的是( )。A.w.num=1002;B.w.grade1=85;C.pw->num=1002;D.w.s.grade2=85;

考题 设有如下定义: struct ss { char name[10] int age; char sex; } std[3],*p=std; 下面各输入语句中错误的是( )。A.scanf("%d",(*p).age);B.scanf("%st",std.name);C.scanf("%c",std[0].sex);D.scanf("%c",(p->sex));

考题 有以下说明和定义语句struct student{ int age; char num[8];};struct student stu[3]={{20,"200401"},{21,"200402"},{10\9,"200403"}};struct student *p=stu;以下选项中引用结构体变量成员的表达式错误的是A.(p++)-numB.p-numC.(*p).numD.stu[3].age

考题 若有结构体定义:struct stu{int num;char sex;int age;}al,a2;则下列语句中错误的是( )。A.printf("%d,%C,%d",a1);B.a2.age=a1.age;C.a1.age++;D.a1.num=5;

考题 设有如下定义 struct ss { char name[10]; int age; char sex; } std[3],*p=std; 下面各输入语句中错误的是A.scanf("%d",(*p).age);B.scant("%s",std.name);C.scanf("%c",std[0].sex);D.scanf("%c",(p->sex));

考题 若定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 struct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

考题 设有以下语句typedef struct S{ int g; char h; } T;则下面叙述中正确的是( )A.可用S定义结构体变量B.可以用T定义结构体变量C.S是struct类型的变量D.T是struct S类型的变量

考题 设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。Struct st{ int x;inty;int z;}Struct worker{ char name[20];char sex;struct st birth;}p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

考题 设定义下列结构体,结构体变量p的出生年份赋值正确的语句是( )。 stmct st { int x; int y; int z; } struct worker { char name[20]; char sex; struct st birth; }p;A.x=1987B.birth.x=1987;C.p.birth.x=1987;D.p.x=1987;

考题 若有以下语句:typedef struct S{int 9;char h;}T;以下叙述中正确的是( )。A.可用s定义结构体变量B.可用T定义结构体变量C.S是struct类型的变量D.T是struct S类型的变量

考题 以下scanf函数调用语句中对结构体变量成员的不正确引用是 struct pupil { char name[20]; int age int sex; } pup[5],*p; p=pup;A.scanf("%s",pup[0].name);B.scanf("%d",pup[0].age);C.scanf("%dT",(p->sex));D.scanf("%d",p->age);

考题 设有如下定义 struct ss { char name[10]; int age; char sex; }std[3], * p=std; 下面各输入语句中错误的是A.cin>>(* p).age);B.cin>>std.name);C.cin>>std[0].sex);D.cin>>(p->.sex));

考题 下列关于结构型变量的定义语句中,错误的是( )A.typedef struct CCCB.define GGG struct { char name[20];GGG CCC { char name[20]; int age; int age; }GGG; }; GGG abc ; GGG CCC abc;C.structD.struct { char name[20]; { char name[20]; int age; int age; }ccc; }abc; CCC abc;

考题 设有以下语句 typedef struct s {int g;char h;}T 则下面叙述中正确的是A.可用S定义结构体变量B.可以用T定义结构体变量C.S是struct类型的变量D.T是structS类型的变量

考题 以下scanf函数调用语句中对结构体变量成员的不正确引用的是()。  struct node{      char name[20];      int age;      int sex; }student[5],*p;  p=student; A、scanf(“%s”,student[0].name);B、scanf(“%d”,student[0].age);C、scanf(“%d”,(p-sex));D、scanf(“%d”,p-age);

考题 若有以下说明和语句: struct student{          int age;          int num;  }std, *p;  p=std;  则下面对该结构体变量std中成员age的引用方式错误的是()。 A、std.ageB、*p.ageC、(*p).ageD、p-age

考题 单选题以下scanf函数调用语句中对结构体变量成员的不正确引用的是()。  struct node{      char name[20];      int age;      int sex; }student[5],*p;  p=student;A scanf(“%s”,student[0].name);B scanf(“%d”,student[0].age);C scanf(“%d”,(p-sex));D scanf(“%d”,p-age);

考题 单选题有如下定义:struct{  int num;  char name[10];  struct {  int y;  int m;  int d; }birth; }s,*ps=s;以下对内嵌结构体成员的引用形式错误的是(  )。A ps.birth.yB s.birth.yC ps-birth.yD (*ps).birth.y

考题 单选题有以下结构体说明、变量定义和赋值语句 structSTD {  charname[10];  intage;  charsex; }s[5],*ps; ps=s[0]; 则以下scanf函数调用语句有错误的是(  )。A scanf("%s",s[0].name);B scanf("%d",s[0].age);C scanf("%c",(ps-sex));D scanf("%d",ps-age);