重要提示: 请勿将账号共享给其他人使用,违者账号将被封禁!
查看《购买须知》>>>
普法考试首页 > 全部分类 > 行业知识普法
搜题
网友您好, 请在下方输入框内输入要搜索的题目:
搜题
题目内容 (请给出正确答案)
[单选题]

关于struct描述正确的是

A.struct不可以实现interface

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

C.struct可以继承class

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

答案
B、struct可以包括无参数的默认构造函数
更多“关于struct描述正确的是”相关的问题

第1题

已知对学生记录的描述为: struct student { int num; char name[20],sex; struct{ int year,month,day; }birthday; }; struct student stu; 设变量stu中的“生日”是“1995年11月12日”,对“birthday”正确赋值的程序是______

A.year=1995;month=11;day=12;

B.stu.year=1995;stu.month=11;stu.day=12;

C.birthday.year=1995;birthday.month=11;birthday.day=12;

D.stu.birthday.year=1995;stu.birthday.month=11;stu.birthday.day=12;

点击查看答案

第2题

已知学生记录描述如下,设变量s中的“生日”应是“1984年11月11日”,下列对生日的正确赋值方式是()。 struct student{ int no; char name[20]; char set; struct{ int year; int month; int day; } birth; }; struct student s;

A.year=1984;month=11;day=11;

B.birth.year=1984; birth.month=11; birth.day=11

C.s.year=1984;s.month=11;s.day=11

D.s.birth.year=1984;s.birth.month=11; s.birth.day=11;

点击查看答案

第3题

以下结构体的定义语句中,正确的是______

A.struct student {int num; char name[10];int age;};stu;

B.struct {int num; char name[10];int age;}student; struct student stu;

C.struct student {int num; char name[10];int age;}stu;

D.struct student {int num; char name[10]; int age;}; student stu;

点击查看答案

第4题

以下选项中,不能定义s为合法的结构变量的是

A.struct abc { double a; char b[10]; } s;

B.struct { double a; char b[10]; } s;

C.struct ABC { double a; char b[10]; }; struct ABC s;

D.struct s { double a; char b[10]; };

点击查看答案

第5题

以下对结构体类型变量的定义中不正确的是

A.#define STUDENT struct student STUDENT {int num; float age; }std1;

B.struct student {int num; float age; }std1;

C.struct {int num; float age; }std1;

D.struct int num; float age; }student; struct student std1;

点击查看答案

第6题

以下结构体类型可以用来构造链表的是

A.struct aa{int a; int *b;};

B.struct bb{int a; bb *b;};

C.struct cc{int *a; cc b;} ;

D.struct dd{int *a; aa b;};

点击查看答案

第7题

以下选项中不能正确把cl定义成结构体变量的是

A.struct color cl { int red; int green; int blue; }

B.typedef struct { int red; int green; int blue; } COLOR; COLOR cl;

C.struct color { int red; int green; int blue; } cl;

D.struct { int red; int green; int blue; } cl;

点击查看答案

第8题

以下对结构体类型变量的定义中,不正确的是()

A.typedef struct aa { int n; float m; }AA; AA tdl;

B.#define AA struct aa AA { int n; float m; } tdl;

C.struct aa { int n; float m; }; struct aa tdl;

D.struct { int n; float m; }tdl;

点击查看答案

第9题

以下选项中不能正确把cl定义成结构体变量的是

A.typedef struct { int red; int green; int blue; } COLOR; COLOR cl;

B.struct color cl { int red; int green; int blue; };

C.struct color { int red; int green; int blue; }cl;

D.struct { int red; int green; int blue; } cl;

点击查看答案

第10题

以下对结构体类型变量的定义中不正确的是

A.struct{ int num; float age; }student; struct student std1;

B.#define STUDENT struct student STUDENT{ int num; float age; }std1;

C.int num; float age; }std1;

D.struct{ int num; float age; }std1;

点击查看答案
下载上学吧APP
客服
TOP
重置密码
账号:
旧密码:
新密码:
确认密码:
确认修改
购买搜题卡查看答案
购买前请仔细阅读《购买须知》
请选择支付方式
微信支付
支付宝支付
选择优惠券
优惠券
请选择
点击支付即表示你同意并接受《服务协议》《购买须知》
立即支付
搜题卡使用说明

1. 搜题次数扣减规则:

功能 扣减规则
基础费
(查看答案)
加收费
(AI功能)
文字搜题、查看答案 1/每题 0/每次
语音搜题、查看答案 1/每题 2/每次
单题拍照识别、查看答案 1/每题 2/每次
整页拍照识别、查看答案 1/每题 5/每次

备注:网站、APP、小程序均支持文字搜题、查看答案;语音搜题、单题拍照识别、整页拍照识别仅APP、小程序支持。

2. 使用语音搜索、拍照搜索等AI功能需安装APP(或打开微信小程序)。

3. 搜题卡过期将作废,不支持退款,请在有效期内使用完毕。

请使用微信扫码支付(元)
订单号:
遇到问题请联系在线客服
请不要关闭本页面,支付完成后请点击【支付完成】按钮
遇到问题请联系在线客服
恭喜您,购买搜题卡成功 系统为您生成的账号密码如下:
重要提示: 请勿将账号共享给其他人使用,违者账号将被封禁。
发送账号到微信 保存账号查看答案
怕账号密码记不住?建议关注微信公众号绑定微信,开通微信扫码登录功能
警告:系统检测到您的账号存在安全风险

为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!

- 微信扫码关注上学吧 -
警告:系统检测到您的账号存在安全风险
抱歉,您的账号因涉嫌违反上学吧购买须知被冻结。您可在“上学吧”微信公众号中的“官网服务”-“账号解封申请”申请解封,或联系客服
- 微信扫码关注上学吧 -
请用微信扫码测试
选择优惠券
确认选择
谢谢您的反馈

您认为本题答案有误,我们将认真、仔细核查,如果您知道正确答案,欢迎您来纠错

上学吧找答案