1、有下列表示按钮的结构体和声明语句 struct BUTTON{ int x,y; int width,height; char name[20]; }; struct BUTTON top[10],*p=top; 下列哪个输入“按钮”名称的语句是正确的?(多选题)A.cin>>p.name;B.cin>>p->name;C.cin>>p[0]->name;D.cin>>p[0].name;

1、有下列表示按钮的结构体和声明语句 struct BUTTON{ int x,y; int width,height; char name[20]; }; struct BUTTON top[10],*p=top; 下列哪个输入“按钮”名称的语句是正确的?(多选题)

A.cin>>p.name;

B.cin>>p->name;

C.cin>>p[0]->name;

D.cin>>p[0].name;


参考答案和解析
B

相关考题:

( 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;

下面结构体的定义语句中,错误的是A)struct ord {int x;int y;int z;}; struct ord a;B)struct ord {int x;int y;int z;} struct ord a;C)struct ord {int x;int y;int z;} a;D)struct {int x;int y;int z;} a;

设有以下说明语句struct ex{ int x ; float y; char z ;} example;则下面的叙述中不正确的是A.struct结构体类型的关键字B.example是结构体类型名C.x,y,z都是结构体成员名D.struct ex是结构体类型名

设有定义:struct person{ int ID;char name[12];}p;请将 scanf("%d", 【 1 2 】 ); 语句补充完整,使其能够为结构体变量 p 的成员 ID 正确读入数据。

下列语句段中,正确的是( )。A.struct{int x;float y;int a[2];unsigned b[3];char name[10];};B.struct stu{unsigned a[3];unsigned b[4];}x;int*p=x.a;C.struct stu{int a;float x[4];}y={1,1.0};float data=y.x;D.struct nd{int a,b;unsigned c[2]=5;};

下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int y;int z;};struct ord a;B.struct ord{int x;int y;int z;};ord a;C.struct ord{int x;int y;int z;}a;D.struct{int x;int y;int z;}a;

下面结构体的定义语句中,错误的是( )。 A.struct ord{int x;int Y;int Z;};struet ord a;SXB 下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int Y;int Z;};struet ord a;B.struct ord{int x;int y;int Z;}struct ord a;C.struct ord{int X;int Y;int Z;}a;D.struct{int X;int y;int Z;}a;

有以下定义和语句: 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 { int no; char name[10];}PERSON; 则下面叙述中错误的是 ( )A.struct是结构体类型的关键字B.struct SS是结构体类型C.PERSON是结构体类型名D.name是结构体成员名

设有定义:struct person{int ID;char name[12];}P;请将scanf(“%d”, 【 】);语句补充完整,使其能够为结构体变量P的成员ID正确读人数据。

若定义下列结构体,结构体变量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;

设定义下列结构体,结构体变量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;

设有下列说明语句: strcut str {int x; float y; char z;}st; 则下列的叙述中不正确的是( )。A.struct是结构体类型的关键字B.st是结构体类型名C.x、y、x都是结构体成员名D.struct str是结构体类型名

下面结构体的定义语句中,错误的是A.struct ord{int x;int y;int z;};struet ord a;B.atruet ord{int x;int y;int z;}struct ord a;C.struet ord{int x;int y;int z;}a;D.struct{int x;int y;int z;)a;

设定义下列结构体,结构体变量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;

设有以下说明语句: struct ex { int x;floct y;char z;} example; 则下面的叙述中不正确的是 ( )A.struct是结构体类型的关键字B.example是结构体类型名C.x,y,z都是结构体成员名D.struct ex是结构体类型

下面结构体的定义语句中,错误的是( )。A.struct ord{int x;int Y;int z;}struct ord a;B.struct ord{int x;im Y;im z;};struct ord a;C.struct ord{int x;int Y;int Z;}a;D.struct{int x;int Y;int z;}a;

设有以下声明语句 street ex { int x;float y;char z;} example; 则下面的叙述中不正确的是 ______ 。A.struct是结构体类型的关键字B.example是结构体类型名C.x,y,z都是结构体成员名D.struct ex是结构体类型

下列语句段中,正确的是( )。A.struct {int x; float y; int a[2]; unsigned b[3]; char name[10]; };B.structstu { unsigneda[3]; unsigned b[4]; }x; int*p=x.a;C.struc tsu { int a; float x[4]; }y={1,1.0}; floatdat a=y.x;D.stmct nd {int a,b; unsigned c[2]=5; };

下列语句段中,正确的是( )。A.street { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p= x.a;C.stmct stu { int a; float x[4]; }y={1,1.0}; float data=y.x;D.struct nd { int a,b; unsigned c[2]=5; };

设有以下声明语句 struct ex { int x;float y;char z;}example; 则下面的叙述中不正确的是______。A.struct是结构体类型的关键字B.example是结构体类型名C.x,y,z都是结构体成员名D.struct ex是结构体类型

下列关于结构型变量的定义语句中,错误的是( )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;

下列语句段中,正确的是( )。A.struct { int x; float y; int a[2]; unsigned b[3]; char name[ 10]; };B.struct stu { unsigned a[3]; unsigned b[4]; }x; int *p= x.a;C.street stu { int a; float x[4]; }y={1,1.0}; float data=y.x;D.struct nd {int a,b; unsigned c[2]=5; };

有以下说明语句:struct Worker{int no;char name[20];};Worker w,*p=w;则下列错误的引用是()A、w.noB、p-noC、(*p).noD、*p.no

有以下说明语句:struct point{int x;int y;}p;则正确的赋值语句是()A、point.x=1;point.y=2;B、point={1,2};C、p.x=1;p.y=2;D、p={1,2};

单选题下面结构体的定义语句中,错误的是(  )。Astruct ord{int x;int y;int z;};struct ord a;Bstruct ord{int x;int y;int z;}struct ord a;Cstruct ord{int x;int y;int z;}a;Dstruct {int x;int y;int z;}a;

单选题有以下说明语句:struct point{int x;int y;}p;则正确的赋值语句是()Apoint.x=1;point.y=2;Bpoint={1,2};Cp.x=1;p.y=2;Dp={1,2};

单选题有以下说明语句:struct Worker{int no;char name[20];};Worker w,*p=w;则下列错误的引用是()Aw.noBp-noC(*p).noD*p.no