小米公司2013校园招聘笔试题(研发)

字体大小: 中小 标准 ->行高大小: 标准

一,填空题

1. 两个人一个速度为a,一个速度为b,相向而行,在距离为s的时候,A放出鸽子,速度为c,鸽子飞到B后,会返回A,遇到A后再返回B。在这期间鸽子飞行的路程

2. (he)的平方 = she。 h,e,s 各代表什么

3. 运算 93 & -8

4. 将无序数组构建成最大堆,最差的时候,复杂度是

5. int *p = &n;

*p 的值是

A. p 的值 B. p的地址 C. n的值 D. n的地址

6. 一个完全二叉树有770节点,那么叶子个数为

7. 有一个数组a[1...100, 1...65] 有100行 65列。

按行优先,如果数组基地址是 10000,每个元素2各存储单元,问a[56, 22]的地址是

8.  写出一下程序结果

  1. #include <iostream>   #include <string>  
  2. using namespace std;   
  3. class B  { 
  4.   public
  5.     B()      { 
  6.         cout<<"B is constructing"<<endl;          s = "B"; 
  7.     }      void f(){ 
  8.         cout<<s;      } 
  9. private:      string s; 
  10. };   
  11. class D:public B{  public
  12.     D():B(){          cout<<"D is constructing"<<endl; 
  13.         s = "D";      } 
  14.     void f(){          cout<<s; 
  15.     }  private
  16.     string s;  }; 
  17.   int main(){ 
  18.       B* b = new D(); 
  19.     b->f();      ((D*)b)->f(); 
  20.     delete b;  } 

此文章由 http://www.ositren.com 收集整理 ,地址为: http://www.ositren.com/htmls/65205.html