全球旧事资料 分类
软件工程师笔试题
软件工程师是从事软件开发相关工作的人员的统称。下面就由为大家介绍一下软件工程师笔试题的文章,欢迎阅读。
软件工程师笔试题篇1考察虚继承内存体系classApublicAcoutCo
structAAcoutDestructAvoidspeakcoutAisspeaki
gclassBpublicvirtualA
fpublicBcoutCo
structBBcoutDestructBclassCpublicvirtualApublicCcoutCo
stuctCCcoutDestructCclassDpublicBpublicCpublic
fDcoutCo
stsructDDcoutDestructDi
tmai
Dp
eDpspeakdeletep输出:Co
structACo
structBCo
stuctC
fCo
stsructDAisspeaki
gDestructDDestructCDestructBDestructA软件工程师笔试题篇2考察非虚析构函数1、classPare
tpublicPare
tcoutPare
tco
structPare
tcoutPare
tdestruct
fclassChildpublicPare
tpublicChildcoutChildco
structChildcoutchilddestructi
tmai
Pare
tpChildc
eChildpcdeletep因为析构函数是非virtual的,故析构的时候按照指针的类型进行析构
f输出:Pare
tco
structChildCo
structPare
tdestruct2、考察初始化列表的写法classApublicAi
txi
tyi
tzaxbycz1Ai
txi
tyi
tzaxbycz2privatei
ta
fi
tbi
tci
tmai
Aa123软件工程师笔试题篇31、考察拷贝构造函数和赋值的区别。classApublicAcoutCo
structAbydefault
fAco
stAacoutco
sttuctAbycopyAoperatorco
stAacoutcos
tAbyoperatorAcoutDestructAi
tmai
AaAba调用拷贝构造函数Aca调用拷贝构造Adda赋值输出:
fCo
structAbydefault构造对象aco
sttuctAbycopy拷贝构造bco
sttuctAbycopy拷贝构造cCo
structAbydefault构造acos
tAbyoperator赋值daDestructADestructADestructADestructA2、考察函数指针voidfu
ccharacout
fi
tmai
voidfpchar填空处fpfu
c函数名fu
c相当于函数的地址,将其赋给函数指针fpcharshellocfps
fr
好听全球资料 返回顶部