由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - C++ online Test
相关主题
C++ Q47: protected constructor (C39)one C/C++ question
One C++ questionC++ Q52: (C6)
一些oop的概念明天要面烙印,求题目
发面经攒rp —— BloombergBB家电面
康州金融公司 Interactive Broker , AQR 面经Qualcomm Phone Interbview面筋,赚RP
请问这个C++问题对吗?贴一道take home的面试题
关于singleton 的面试题今早Bloomberg电话面试经过,奉献给大家。。。
C++ Q 103-105新Qualcomm面经
相关话题的讨论汇总
话题: ensure话题: instances话题: cannot话题: class话题: subclass
进入JobHunting版参与讨论
1 (共1页)
h*****g
发帖数: 312
1
class A
{
public:
void f{};
protected:
A(){};
A(const A&){}
}
Referring to the sample code above, why are the default and copy
constructors declared as protected?
A.
To ensure that instances of A can only be created by subclasses of A
B.
To ensure that instances of A cannot be created via new by a more derived
class
C.
To ensure that instances of A cannot be copied
D.
To ensure that A cannot be instantiated on the stack
E.
To ensure that A cannot be used as a base class
答案给的是A。 那如何由子类去创造 A 的object 呢?A * p= new subclass 可行吗?
能call A的ctr吗?
e*****e
发帖数: 1275
2
subclass 来create A 好啦~~~一定要subclass或者是friend class 哦
F**********r
发帖数: 237
3
那c)怎么实现?
1 (共1页)
进入JobHunting版参与讨论
相关主题
新Qualcomm面经康州金融公司 Interactive Broker , AQR 面经
再帖一遍Amazon Onsite的题请问这个C++问题对吗?
one c++ questions关于singleton 的面试题
Bloomberg网上测试题C++ Q 103-105
C++ Q47: protected constructor (C39)one C/C++ question
One C++ questionC++ Q52: (C6)
一些oop的概念明天要面烙印,求题目
发面经攒rp —— BloombergBB家电面
相关话题的讨论汇总
话题: ensure话题: instances话题: cannot话题: class话题: subclass