微软2014校招研发工程师笔试卷A

时长:120分钟 总分:100分

274浏览 1人已完成答题

题型介绍
题型 单选题 多选题
数量 14 11
1.
Initialize integer i as 0, what's the value of i after the following operation?i += i > 0 ? i++ : i--
问题详情

Initialize integer i as 0, what's the value of i after the following operation?i += i > 0 ? i++ : i--





2.
Which of the follwing sequence(s) could not be a postorder tree walk result of a binary search tree?
问题详情

下面序列哪个不可能是二叉搜索时的后序遍历结果?




3.
How many times is f() called when calculating f(10)?
问题详情

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 
}





4.
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
问题详情

Asume you have an object to describe customer data:{ ID(5 digit numeric) Family Name(string) Account Balance(currency) } 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 (1) get IDs from Name and (2) get Name from ID?




5.
The best time complexity of quick sort algorithm is?
问题详情

The best time complexity of quick sort algorithm is:




6.
Which of the following method(s) CANNOT be used for Text-encryption?
问题详情

Which of the following method(s) CANNOT be used for Text-encryption:




7.
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
问题详情

To speed up data access , 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:





8.
A table CANNOT have one or more of the following index configurations.
问题详情




9.
下面哪些调用转换支持可变长度参数。
问题详情

下面哪些调用转换支持可变长度参数




10.
下面程序执行结果是?
问题详情

下面程序执行结果:
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 
}




11.
Windows 下进程和线程的描述,哪些是对的?
问题详情

Windows 下进程和线程的描述,哪些是对的:




12.
下面代码段的运行结果是?
问题详情

下面代码段的运行结果(环境linux平台, g++编译器):
int main() { 
    int x = 10 
    int y = 10 
    x = y = ++y 
    printf("%d %d", x, y) 
    return 0 
}




13.
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] 返回?
问题详情

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] 返回()




14.
下面程序的执行结果是?
问题详情

下面程序的执行结果:
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 
}





15.
1000 个瓶子中有一瓶毒药,一只老鼠吃到毒药一周之内会死,如果要在一周之内检测出有毒药的一瓶,问至少需要几只老鼠?
问题详情




16.
Which statement(s) is(are) correct about thread and process?Select all that apply.
问题详情

Which statement(s) is(are) correct about thread and process?Select all that apply.





17.
Which statement(s) below regarding TCP(Transmission Control Protocol) is(are) correct? Select all that apply.
问题详情

Which statement(s) below regarding TCP(Transmission Control Protocol) is(are) correct? Select all that apply.





18.
When a dll is loaded into memory, which part(s) can be shared between processes?
问题详情




19.
In which case(s) would you use an outer join?
问题详情





20.
Which of the following method(s) could be used to optimize the speed of a program ?
问题详情

Which of the following method(s) could be used to optimize the speed of a program ?




21.
Which regular expression(s) matches the sentence "www.microsoft.com" ?
问题详情

Which regular expression(s) matches the sentence "www.microsoft.com" ?





22.
Which of the following can be referred to as attack method(s)? Select all that apply.
问题详情

Which of the following can be referred to as attack method(s)? Select all that apply




23.
Which of the following is(are) true about providing security to database servers ? Select all that apply
问题详情

Which of the following is(are) true about providing security to database servers ? Select all that apply




24.
链表和数组的区别。
问题详情




25.
下面说法哪些正确?
问题详情

下面说法哪些正确: