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 | | j********x 发帖数: 2330 | |
|