攒人品,发几个面试题 C/C++# JobHunting - 待字闺中
c*b
1 楼
1: How you would find out if a machine's stock grows up or down in memory (
using a simple program)?
2: Implement a thread-safe singleton. Note: The singleton instance should be
created only when requested
3: Explain exception safety in C++
4: Explain the difference between the following:
--"malloc"
--"new operator"
--"operator new"
5: What are the differences between
std::list
std::vector
std::std::map
6:一道老题,给定一个字符串,第一个单词与最后一个单词对调,第二个单词与倒数第
二个对调。
7:三个箱子,一个箱子装红球,一个箱子装黑球,一个箱子有红有黑。
每个箱子都有个牌子,上写红,黑,混合
已知每个箱子上的牌子都挂错了
选一个箱子,从这个箱子中取一个球,根据结果把正确的牌子挂到箱子上
using a simple program)?
2: Implement a thread-safe singleton. Note: The singleton instance should be
created only when requested
3: Explain exception safety in C++
4: Explain the difference between the following:
--"malloc"
--"new operator"
--"operator new"
5: What are the differences between
std::list
std::vector
std::std::map
6:一道老题,给定一个字符串,第一个单词与最后一个单词对调,第二个单词与倒数第
二个对调。
7:三个箱子,一个箱子装红球,一个箱子装黑球,一个箱子有红有黑。
每个箱子都有个牌子,上写红,黑,混合
已知每个箱子上的牌子都挂错了
选一个箱子,从这个箱子中取一个球,根据结果把正确的牌子挂到箱子上