由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
JobHunting版 - C++相关的面经
相关主题
说说我被面试到的c++题目吧C++ online Test 一题
一道 C++ 的题。Bloomberg Phone Interview
一般电面C++会问到什么专业问题?说说找工作的体会
新Qualcomm面经an old c++ question
One C++ questionQc, Yahoo, Cisco面经
Amazon面经Amazon电面面经
问一个constructor的问题包子呼唤大牛--问关于C++Destructor的问题 (转载)
Placement new的一个问题问个C++重新编译的问题
相关话题的讨论汇总
话题: what话题: exception话题: c++话题: class话题: empty
进入JobHunting版参与讨论
1 (共1页)
x****k
发帖数: 2932
1
银行相关的职位,题目比较多,尽量拣记得住的写一下。
1. the difference of new/delete malloc/free. what if new/free, and malloc/
delete?
2. sizeof an empty class
3. sizeof an empty class with virtual function.
4. can we call virtual function in constructor/destructor?
5. what is pure virtual function?
6. How to disable class initialized on heap,
7. How disable class initialized on stack,
8. where static varible saved, heap or stack?(bss, data)
9. what does static mean in C++
10. what is 4 default functions for empty class
11. when throw exceptions, why use reference to catch exception(这题牛人指点
一下),
12. what is the syntax to catch all exception?
13. can constructor/destructor throw exception.
14. what will happen if 2 or more exceptions happened?
15. why we need exception in C++?(what is the benefit we can have by using
exception)
16. What the design pattern do you use?
17. Tell me all STL containers you know.
18. Can we use auto_ptr as element in set or map?
b*******y
发帖数: 1240
2
6,7怎么答啊

【在 x****k 的大作中提到】
: 银行相关的职位,题目比较多,尽量拣记得住的写一下。
: 1. the difference of new/delete malloc/free. what if new/free, and malloc/
: delete?
: 2. sizeof an empty class
: 3. sizeof an empty class with virtual function.
: 4. can we call virtual function in constructor/destructor?
: 5. what is pure virtual function?
: 6. How to disable class initialized on heap,
: 7. How disable class initialized on stack,
: 8. where static varible saved, heap or stack?(bss, data)

x****k
发帖数: 2932
3
6,overload new operator,
7, private constructor(like singleton)
j********x
发帖数: 2330
4
11
子类与父类之间存在隐式转换,很显然会影响具体异常对象的行为;此外使用
reference可以保存多态,印象里exceptional C++讲过
what is the syntax to catch all exception
此外因为异常对象可能会多次传播,reference减少了不必要的copy
x****k
发帖数: 2932
5
11
保持多态应该是一个理由,但是 pointer也可以做同样的事啊。
j********x
发帖数: 2330
6
那如果忘记delete怎么办
j********x
发帖数: 2330
1 (共1页)
进入JobHunting版参与讨论
相关主题
问个C++重新编译的问题One C++ question
C++面试问题,高人请进啊~~~Amazon面经
请教1个工作面试题问一个constructor的问题
为什么C++的constructor出错可以抛出异常,而destructor出错Placement new的一个问题
说说我被面试到的c++题目吧C++ online Test 一题
一道 C++ 的题。Bloomberg Phone Interview
一般电面C++会问到什么专业问题?说说找工作的体会
新Qualcomm面经an old c++ question
相关话题的讨论汇总
话题: what话题: exception话题: c++话题: class话题: empty