微软2014校招研发工程师笔试卷A
时长:120分钟 总分:100分
274浏览 1人已完成答题
题型介绍
题型 | 单选题 | 多选题 |
---|---|---|
数量 | 14 | 11 |
Initialize integer i as 0, what's the value of i after the following operation?i += i > 0 ? i++ : i--
Which of the follwing sequence(s) could not be a postorder tree walk result of a binary search tree?
How many times is f() called when calculating f(10)?
int f(int x) { if(x <= 2) return 1 return f(x - 2) + f(x - 4) + 1 }
If you have 500,000 Chinese customers records represented by instances of this object type , what set of data structures is best to get fast retrieval of customers
The best time complexity of quick sort algorithm is?
Which of the following method(s) CANNOT be used for Text-encryption?
we build cache system. In one system , The L1 cache access time is 5 ns , the L2 cache access time is 50 ns and the memory access time is 400 ns. The L1 cache miss rate is 50% , the L2 cache miss rate is 10%. The average data access time of this system is
下面程序执行结果是?
using namespace std class A{ public: virtual void f() { cout << "A::f() " } void f() const { cout << "A::f() const " } } class B : public A { public: void f() { cout << "B::f() " } void f() const { cout << "B::f() const " } } void g(const A* a) { a->f() } int main(int argc, char *argv[]) { A* p = new B() p->f() g(p) delete(p) return 0 }
下面代码段的运行结果是?
int main() { int x = 10 int y = 10 x = y = ++y printf("%d %d", x, y) return 0 }
C# 程序段的结果: int[][] array = new int[3][]{ new int[3]{5,6,2}, new int[5]{6,9,7,8,3}, new int[2]{3,2} } array[2][2] 返回?
下面程序的执行结果是?
class A{ public: long a } class B : public A { public: long b } void seta(A* data, int idx) { data[idx].a = 2 } int main(int argc, char *argv[]) { B data[4] for(int i=0 i<4 ++i){ data[i].a = 1 data[i].b = 1 seta(data, i) } for(int i=0 i<4 ++i){ std::cout << data[i].a << data[i].b } return 0 }