2、关于struct描述正确的是A.struct不可以实现interfaceB.struct可以包括无参数的默认构造函数C.struct可以继承classD.struct可以包括静态构造函数

2、关于struct描述正确的是

A.struct不可以实现interface

B.struct可以包括无参数的默认构造函数

C.struct可以继承class

D.struct可以包括静态构造函数


参考答案和解析
struct可以包括静态构造函数

相关考题:

有以下程序段typedef struct node { int data; struct node *next; } *NODE;NODE p;以下叙述正确的是A)p 是指向 struct node 结构变量的指针的指针B)NODE p ;语句出错C)p 是指向 struct node 结构变量的指针D)p 是 struct node 结构变量

以下结构体类型说明和变量定义中正确的是A)typedef struct{int n; char c;} REC;REC t1,t2;B)struct REC;{int n; char c;};REC t1,t2;C)typedef struct REC ;{int n=0; char c='A';} t1,t2D)struct{int n;char c;}REC;REC t1,t2;

有以下程序段 typedef struct node { int data; struct node *next; } *NODE; NODE p; 以下叙述正确的是( )。A.p是指向struct node结构变量的指针的指针B.NODE p;语句出错C.p是指向struct node结构变量的指针D.p是struct node结构变量

以下对结构体类型变量的定义中,不正确的是A.typedef struct aa{ int n;float m;}AA;AA tdl;B.#define AA struct aaAA{ int n;float m;} tdl;C.struct{ int n;float m;} aa;struct aa tdl;D.struct{ int n;float m;} tdl;

若有以下结构体,则正确的定义或引用的是struct Test{int x;int y;} vl;A.Test.x=10;B.Test v2;v2.x=10;C.struct v2;v2.x=10;D.struct Test v2={10};

下列关于结构型、共用型、枚举型的定义语句中,正确的是( )。A.struct ss{int x}B.union uu{int x;}xx=5;C.enum ee{int x};D.struct{int x;};

设有如下说明typedef struct{ int number; char class;double score;}student;则以下选项中,能正确定义结构体数组并赋初值的语句是( )。A.student tt[2]={{189,’A’,62},{190,’B’,75}};B.student tt[2]={189,’"A",62,190,"B",75};C.struct tt[2]={{189,’A’},{190,’B’}};D.struct tt[2]={{189,"A",62.5},{190,"B",75.0}};

设有如下说明:typedef struct{int n;char c;double x;}STD;有以下选项,能正确定义结构体数组并赋初值的语句是( )。A.STD ttr2]={{1,'A',62),{2,'B',75}};B.STD tt[2]={1,"A",62,2,"B",75};C.struct tt[2]={{1,'A'},{2,'B'}};D.struct tt[2]={{1,"A",62.5},{2,"B",75.O}};

下列语句段中,正确的是( )。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.typedef structB.struct REC; {int n;char c;}REC; {int n;char c;}; REC t1,t2; REC t1,t2;C.typedef struct REC;D.struct {int n=0;char c='A';}t1,t2; {int n;char c;}REC; REC t1,t2;

设有如下说明typedef struct{ int n; char c; double x;}STD;则以下选项中 ,能正确定义结构体数组并赋初值的语句是A.STD tt[2]={{1,'A',62},{2,'B',75}};B.STD tt[2]={1,"A",62,2,"",75};C.struct tt[2]={{1,'A'},{2,'B'}};D.struct tt[2]={{1,"A",62.5},{2,"B",75.0}};

若有以下结构体,则正确的定义或引用的是( )。 struct Test { int x; int y; } vl;A.Test.x=10;B.Test v2;v2.x=10;C.struet v2;v2.x=10;D.struct Test v2={10};

有以下定义和语句: 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;

以下程序的功能是:建立一个带有头结点的甲—向链表,并将存储在数组中的字符依次转存到链表的各个结点中,请从与下划线处号码对应的一组选项中选择出正确的选项。#include <stdlib.h>struct node{ char data; struct node *next: };(1) CreatList(char *s){struct node *h,*p,*q;h = (struct node *)malloc sizeof(struct node));p=q=h;while(*s! ='\0'){p = (struct node *)malloc(sizeof (struct node));p->data = (2) ;q->next = p;q - (3) ;S++;}p->next='\0';return h;}main(){char str[]="link list";struct node *head;head = CreatList(str);}(1)A.char*B.struct nodeC.struct node*D.char

若有以下结构体定义,则______是正确的引用或定义。 struct example { int x; int y; }v1;A.example.x=10B.example v2.x=10C.struct v2;v2.x=10D.struct example v2={10};

已知形成链表的存储结构如下图所示,则下述类型描述中的空白处应填______。 struct link { char data; ______; }node;A.struct link nextB.link * nextC.struct next linkD.struct link *next

若有以下结构体定义,则是正确的引用或定义。struct example{ int x; int y;}v1;A.example.x=10B.examplev2.x=10C.struct v2;v2.x=10D.struct example v2={10};

若有以下结构体定义,则______是正确的引用或定义。 struct example { int x; int y; }v1;A.example.x=10B.example v2.x=10C.example.x=10D.struct example v2={10};

若有以下结构体,则正确的定义或引用是( )。 struct Test { int x; int y; }v1;A.Test.x=10;B.Test v2;v2.x=10;C.struct Test v2;v2.x=10;D.struct Test.v2=10;

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

结构体变量的定义格式正确的是()A、struct变量名;B、结构名变量名;C、struct结构名变量名;D、struct变量名结构名;

数据结构里,有名为goods的结构体,定义这种结构体的指针变量正确的是()。A、struct p;B、struct goods p;C、struct goods;D、goods p;

结构体指针的定义方式正确的是()A、struct结构体名 指针变量名;B、struct结构体名;C、struct指针变量名;D、struct指针变量名 结构体名;

已知product是结构体类型,定义含有十个元素是该类型的数组不正确的是()。A、struct producta[10];B、struct producta{10};C、struct producta10;D、struct producta(10);

数据结构中,struct pro { int id; char name[20]; }; void fun(struct pro p[]) { ......;//函数体省略 }关于本程序段描述不正确的是()。A、fun函数是按照值传递进行的B、fun函数是结构体数组作为参数C、结构体数组做参数,属于地址传递D、数组p做参数传递是数组的首地址

定义结构体类型的指针变量格式不正确的是()A、struct结构名指针变量名;B、struct结构名*指针变量名;C、struct*指针变量名结构名;D、struct指针变量名结构名;

下面正确的结构体定义格式是()A、struct结构体名{类型成员变量1;类型成员变量2;….类型成员变量n;};B、struct结构体名{类型成员变量1;类型成员变量2;….类型成员变量n;}C、struct{类型成员变量1;类型成员变量2;….类型成员变量n;}结构体名;D、struct{类型成员变量1;类型成员变量2;….类型成员变量n;}结构体名

单选题数据结构中,struct pro { int id; char name[20]; }; void fun(struct pro p[]) { ......;//函数体省略 }关于本程序段描述不正确的是()。Afun函数是按照值传递进行的Bfun函数是结构体数组作为参数C结构体数组做参数,属于地址传递D数组p做参数传递是数组的首地址