经典面试题,大家帮忙解答!!

百度面试:

1。一个随机生成器,能能生成110000的数,请问怎么用这个随机数生成器生成1020的随机数?

2。一个随机生成器,只能生成09单位数,请问怎么用这个生成器生成任意的N位整数?

3。系统中资源共享有几种方式?

4TCP建立连接和释放连接的过程是怎样的?

 

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位为空。现有十六位颜色编码,其中R5位,G6位,B5位。

unsigned short ConvertRGB888toRGB565(unsigned int nSourceColor);

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值