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

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

a)Can a struct inherit from another struct?

(结构体能继承结构体吗)

b)Can a struct inherit from another class?

(结构体能继承类吗)

c)Can a struct be the base of another class?

(结构体可以作为一个类的基类吗)

d)Can a struct implement an interface?

(结构体可以实现一个接口吗)

e)What’s the difference between struct and class?

(结构体与类有什么区别)


参考答案

更多 “ a)Can a struct inherit from another struct?(结构体能继承结构体吗)b)Can a struct inherit from another class?(结构体能继承类吗)c)Can a struct be the base of another class?(结构体可以作为一个类的基类吗)d)Can a struct implement an interface?(结构体可以实现一个接口吗)e)What’s the difference between struct and class?(结构体与类有什么区别) ” 相关考题
考题 以下对结构体类型变量的定义中,不正确的是( )A.typedef struct aa { int n; float m; }AA; AA tdl;B.#define AA struct aa AA{ int n; float m; }tdl;C.struct { int n; float m; }aa; struct aa tdl;D.struct { int n; float m, }tdl;

考题 以下对结构体类型变量td的定义中,错误的是______。A.typedef struct aa { int n; float m; }AA; AA td;B.struct aa { int n; float m; }td; struct aa td;C.struct { int n; float m; }aa;D.struct { int n; float m; }td; struct aa td;

考题 以下对结构体类型变量td的定义中,错误的是( )。A.typcdef struct aa { int n; float m; } AA; AA td;B.struct aa {int n; float m; } struct aa td;C.struct {int n; float m; } aa; struct aa td;D.struct {int n; float m; }td;

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

考题 在C++语言中,struct与class的区别是?A.class允许继承,而struct不允许继承。#B.class有构造函数,而struct没有构造函数。#C.对于成员访问权限以及继承方式,class中默认的是private的,而struct中则是public的。class还可以用于表示模板类型,struct则不行。#D.class有析构函数,而struct没有析构函数。

考题 struct是定义结构体的关键字。

考题 结构体类型的名字是由一个关键字struct和结构体名组合而成的。

考题 4.结构体指针变量的一般定义形式如下: struct 结构体类型名 *结构体指针变量名;

考题 3. 结构体指针变量的一般定义形式如下: struct 结构体类型名 *结构体指针变量名;

考题 14、可用struct 结构体名来定义结构体类型。