经典面试题,大家帮忙解答!!
2010-07-20 20:10
281 查看
百度面试:
1。一个随机生成器,能能生成1到10000的数,请问怎么用这个随机数生成器生成10到20的随机数?
2。一个随机生成器,只能生成0到9单位数,请问怎么用这个生成器生成任意的N位整数?
3。系统中资源共享有几种方式?
4。TCP建立连接和释放连接的过程是怎样的?
Gameloft(手机游戏老大)
1. What numbers are considered “true” in c plus plus?
2. What are inline functions?
3. What is Memory Alignment?
4. Explain ‘passing by value’, ‘passing by reference’, ‘passing by pointer’?
5. What are the possible problems with implicit copy constructor?
6. Explain the need for “Virtual Destructor”?
7. What is the difference between ‘overloading’ and ‘overriding’?
8. Why pre Increment operator can be faster than after Increment?
9. Optimize the following expressions.
& logic and
| logic or
>> move right
<< move left
% 取余
/ 取整
(a) int a=b*4;
(b) int a=b*72;
(c) int a=b%1;
(d) int a=b%16;
(e) int a=(b+c)/2;
(f) int a=(b*3)/8;
(g) int a=(b%8)*4;
10.编写一个函数,完成以下功能,如AABBBCCCDEFF输出为2A3B3CDE2F。
String Compress(String text)
10. 颜色编码转化函数,RGB颜色编码占32位,四个字节,其中最高字节8位为空。现有十六位颜色编码,其中R占5位,G占6位,B占5位。
unsigned short ConvertRGB888toRGB565(unsigned int nSourceColor);
1。一个随机生成器,能能生成1到10000的数,请问怎么用这个随机数生成器生成10到20的随机数?
2。一个随机生成器,只能生成0到9单位数,请问怎么用这个生成器生成任意的N位整数?
3。系统中资源共享有几种方式?
4。TCP建立连接和释放连接的过程是怎样的?
Gameloft(手机游戏老大)
1. What numbers are considered “true” in c plus plus?
2. What are inline functions?
3. What is Memory Alignment?
4. Explain ‘passing by value’, ‘passing by reference’, ‘passing by pointer’?
5. What are the possible problems with implicit copy constructor?
6. Explain the need for “Virtual Destructor”?
7. What is the difference between ‘overloading’ and ‘overriding’?
8. Why pre Increment operator can be faster than after Increment?
9. Optimize the following expressions.
& logic and
| logic or
>> move right
<< move left
% 取余
/ 取整
(a) int a=b*4;
(b) int a=b*72;
(c) int a=b%1;
(d) int a=b%16;
(e) int a=(b+c)/2;
(f) int a=(b*3)/8;
(g) int a=(b%8)*4;
10.编写一个函数,完成以下功能,如AABBBCCCDEFF输出为2A3B3CDE2F。
String Compress(String text)
10. 颜色编码转化函数,RGB颜色编码占32位,四个字节,其中最高字节8位为空。现有十六位颜色编码,其中R占5位,G占6位,B占5位。
unsigned short ConvertRGB888toRGB565(unsigned int nSourceColor);
相关文章推荐
- delphi的面试题 请大家帮忙解答一下
- 一道经典的笔试面试题考考大家
- 经典算法面试题解答(三)----- 最短路径、最长路径
- 微软实战训练营[威武]公开课《解答Web Service和WCF、SOA经典面试题》
- C#绝对经典面试题及解答
- 经典面试题解答(四)
- 有个vb.net2005+sql2005的数据库问题 大家能不能帮忙解答阿!
- 一道关于数据库(经典父子级 ID 关联)更新题,大家帮忙想想还有其它解决思路没有?
- Android关于布局的经典面试题及解答(一)
- Android经典面试题及解答(二)
- C#绝对经典面试题及解答
- 不知道这是什么错误,什么原因造成,请大家帮忙解答
- 经典面试题解答
- 经典面试题解答
- LINUX内核经典面试题30道及解答
- Oracle经典面试题以及解答
- java经典面试题解答
- 10道超难面试题的经典解答,题题可得满分!
- 经典面试题解答
- 李洪强经典面试题45