单选题有以下说明语句: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 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};


参考解析

解析: 暂无解析

相关考题:

下面结构体的定义语句中,错误的是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;

有如下类定义:class Point{int x_, y_;public:Point():x_(0), y_(0){}Point(int x, int y = 0):x_(x),y_(y){}};若执行语句Point a(2), b[3] , *c[4];则 Point 类的构造函数被调用的次数是A . 2 次B . 3 次C . 4 次D . 5 次

下列语句段中,正确的是( )。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;

设有以下定义stuct ss{ int info; struct ss *link;}x,y,z;且已建立如下图所示链表结构:请写出删除结点y的赋值语句【 】。

有如下程序:#includeiostream#includecmathusing std::cout;class Point{public:friend double distance(const Point p); //P距原点的距离Point(int xx=0,int yy=0):x(xx),Y(YY){}//①private:int x,y;};double distance(const Point p){ //②return sqrt(P.x*P.x+P.y*P.y);}int main(){Point p1(3,4);coutdistance(p1);return 0; //③}下列叙述中正确的是A.程序编译正确B.程序编译时语句①出错C.程序编译时语句②出错D.程序编译时语句③出错

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

以下合法的赋值语句是______。A.X=Y=100B.D-;C.X+Y;D.C=int(A+B) 以下合法的赋值语句是______。A.X=Y=100B.D-;C.X+Y;D.C=int(A+B)

下面结构体的定义语句中,错误的是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;

下面结构体的定义语句中,错误的是( )。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;

设有以下C语言说明语句,则值为210的表达式是(33)。 struct s { int a;int *b;}; Int x0[]={110,120},x1[]={210,220}; struct s x[]={{100},{200}},*p=x; x[0].b=x0;x[1].b=x1;A.(++p)->aB.*p->bC.*(p++)->bD.*(++p)->b

下列语句段中,正确的是( )。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; };

以下合法的赋值语句是______。A.X=Y=100B.D-;C.X+YD.C=int(A+B) 以下合法的赋值语句是______。A.X=Y=100B.D-;C.X+YD.C=int(A+B)

下列语句段中,正确的是( )。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; };

若有语句:int x,*p=x;则与该语句等价的语句是()A、intx,*p;*p=x;B、int x,*p;p=x;C、int x,*p;*p=x;D、int x,*p;p=x

有说明语句int *p=new int[10];访问动态数组元素的正确语句是()A、int a=p;B、int a=*p;C、delete int[]pD、delete p int[10]

设有C语句:struct T{int n;double x;}d,*p;,若要使p指向结构体变量中的成员n,正确的赋值语句是()A、p=d.nB、*p=d.nC、p=(struct T *)d.nD、p=(struct T *)d.n

有以下说明语句: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};

有以下说明语句:struct Point{int x;int y;};则叙述正确的是()A、正确的结构类型说明B、正确的结构变量说明C、错误的原因是结构中成员类型相同D、无意义的说明

以下不合法的赋值语句是()A、x=(1,y=2);B、++x;C、x=y=15;D、y=int(x);

在下面C语言的函数说明语句中,正确的是()。A、int fun(int x, int y);B、int fun(int x,y);C、int fun(x,y);D、int fun(int x; int y);

单选题下面结构体的定义语句中,错误的是(  )。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;};则叙述正确的是()A正确的结构类型说明B正确的结构变量说明C错误的原因是结构中成员类型相同D无意义的说明

单选题设有C语句:struct T{int n;double x;}d,*p;,若要使p指向结构体变量中的成员n,正确的赋值语句是()Ap=d.nB*p=d.nCp=(struct T *)d.nDp=(struct T *)d.n