Microsoft2013校园招聘笔试题

继续求拍砖!!!!

1. You are managing the database of a book publichser, you currently store the book orders your company receives in the following BookOrders table. You manager has asked you to generate a report to list all the orders where the quantity ordered was greater than the average quantity per order for that book. Which of the following queries will satisfy the business requirements? (3Points)

A.  select BookID from BookOrders A where QuantityOrdered > (select avg(QuantityOrdered) from BookOrders B where B.BookID = B.BookID)

B. select OrderID from BookOrders A where QuantityOrdered > (select avg(QuantityOrdered) from BookOrders B where B.BookID = A.BookID)

C. select BookID from BookOrders A where QuantityOrdered > (select avg(QuantityOrdered) from BookOrders B where B.BookID = A.BookID)

D. select  OrderID from BookOrders A where QuantityOrdered>(select avg(QuantityOrdered) from BookOrders B where A.BookID=A.BookID)

2.Which one CANNOT be used to communicate between 2 processes on Windows?

A. Named event        B. Named Pipe       C.  Critical Section             D. Shared Memory

3. Which of the following operation is NOT basic operation of stack?

A. Push an element to the stack                        B. Pop an element from the stack

C. Check if the stack is empty                         D. Sort the stack

4.Which of the following design patterns is(are) "creational" pattern(s)?

A. Facade             B.Singleton                    C. Composite                D.None of the above

5. Which of the following TCP packets sequence is(are) correct for TCP handshake when setting up a connection?

A. SYN, SYN+ACK, SYN+ACK                      B. SYN+ACK, SYC + ACK, SYN

C. SYN, SYN+ACK, RST                               D. SYN, SYN, ACK

E. None of the above

6. The characteristics of functional programming are

A. Avoidance of changing state and mutable data

B. Referential transparency

C. Lambda calculus

D. Thread-safe

E. All of above

7. The Hypertext Transfer Prorocol (HTTP) is an application protocol for distributed collaborative, hypermedia information systems. It is the foundation of data communication for the World Wide Web. Which of the following statment(s) is(are) correct:

A. It functions as a request-response protocol in the client-server computing model

B. It is a stateless protocol is that treats each request as an independent transaction

C. It is the protocol that major Internet applications such as the World Wide Web and email rely on

D. The HTTP response includes a numeric status code, and the status code "404" often stands for "Page Not Found"

E. None of the above

8. Which is correct about shallow copy in C++?

A. Shallow copy only copy reference

B. Shallow copy will cause possible physical pointer duplication

C. Shallow copy may caue problems in case of assignment or parameter passing in function

D. Copy constructor may mitigate the risk of shallow copy

9. There are 15 balls that are put into 4 bags. It is required that every bag has at least 1 ball but the number of balls in every bag should be different. How many different ways totally,can be used to put the balls into the 4 bags?

A. 4                 B. 5                   C. 6                 D. 7                      E. None of the above

10. What will be the output of this program?

  1. class Base
  2. {
  3. public:
  4. char Value(){ return 'A'; }
  5. virtual char VirtualValue() { return 'V'; }
  6. };
  7.  
  8. class Derived : public Base
  9. {
  10. public:
  11. virtual char Value() { return 'D'; }
  12. };
  13.  
  14. class VirtualDerived:virtual public Base
  15. {
  16. public:
  17. char Value() { return 'Z'; }
  18. char VirtualValue() { return 'X'; }
  19. };
  20.  
  21. int main()
  22. {
  23. Base* b1 = new Derived();
  24. Base* b2 = new VirtualDerived();
  25.  
  26. cout<<b1->Value() <<''<<
  27. b1->VirtualValue()<<''<<
  28. b2->Value() <<''<<
  29. b2->VirtualValue()<<endl;
  30. }

A.   A V A X                 B.  D V A X      C. A V Z X        D. A V Z V            E. D V Z X

11. Tow 32 bit integer values A and B, are processed to give the 32 bit integers C and D as per the following rules. Which of the rule(s) is(are) reversible? i.e.  is it possible to obtain A and B given c and D in all condition?

A.   C = (int32)(A+B), D = (int32)(A-B)

B.   C = (int32)(A+B),  D= (int32)((A-B)>>1)

C.   C = (int32)(A+B),  D = B

D.   C = (int32)(A+B), D = (int32)(A+2*B)

E.   C = (int32)(A*B),  D = (int32)(A/B)

12. If a pre-order traversal sequence of a binary tree is abcdefg, which of the following(s) is(are) possible in-order traversal sequence?

A. abcdefg     B. gfedcba        C. bcdefga           D. bceadfg           E. bcdaefg

13. T(x) = 1(x<=1), T(n) = 25*T(n/5)+n^2 What is T(n)?

A. O(nlogn)             B. O(n^2logn)            C. O(n^2)           D. O(n^3)       E. O(n^3logn)

14. There are two threads running on a dual-core machine. Their main body are listed as following c code snippet thread1: x=1; r1=y; thread2: y=1; r2 = x;  x, y are two global variables initialized as zero. Which is(are)the possible value(s) of r1 and r2?

A. r1=1, r2 =1           B. r1=1,r2=0             C. r1=0, r2 =1    D r1=0, r2=0

15. The depth of a complete binary tree with n elements is
A. D(n) = log2(n)              B. D(n) = 1+log2(n)             C. D(n) = n * log2(n)       D. D(n) = 1 + n*log2(n)

16. How many 0 appears in 1,2,3,...,999,1000?

A. 189          B. 191          C. 193            D. 195

注:算出来结果是192

17. What is the probability for born on 2/28 vs born on 2/29? and what for born on 2012/2/28 vs born on 2012/2/29?

A: 1:1 and 1:1         B. 4:1 and 1:1        C. 1:1 and 4:1       D. 4:1 and 4:1

18. Which of the following use(s) greedy strategy?

A. Dijkstra algorithm in single-source shortest path

B. Prim's algorithm in minimum spanning tree

C. Kruskal's algorithm in minimum spanning tree

D. Floyd-Warshall algorithm in all-pairs shortest paths

E. KMP algorithm in string match

19. Given the following code:

  1. class A
  2. {
  3. public:
  4. int k1; int k2;
  5. };
  6.  
  7. int cmp(A x, A y) { return x.k1 - y.k1;}
  8. void exchange(A a[], int i, int j) { A t = a[i]; a[i] = a[j]; a[j] = t;}
  9. void f1(A a[], int l, int(*c)(A x, A y))
  10. {
  11. for(int i = 0; i < l; ++i)
  12. {
  13. int min = i;
  14. for(int j = i+1; j < l; ++j)
  15. {
  16. if(c(a[j], a[min])<0) min = j;
  17. }
  18. exchange(a, i, min);
  19. }
  20. }
  21.  
  22. void f2(A a[], int l, int(*c)(A x, A y))
  23. {
  24. for(int i = 1; i < l; ++i)
  25. {
  26. A t = a[i]; int j = i-1;
  27. while(c(t, a[j])<0 && j >=0)
  28. {
  29. a[j+1] = a[j];
  30. j = j-1;
  31. }
  32. a[j+1] = t;
  33. }
  34. }
  35.  
  36. void f3(A a[], int l, int(*c)(A x, A y))
  37. {
  38. for(int i = 0; i < l; ++i)
  39. {
  40. for(int j = l-1; j > i; --j)
  41. {
  42. if(c(a[j], a[j-1])< 0) exchange(a, j-1, j);
  43. }
  44. }
  45. }
  46.  
  47. int _f41(A a[], int low, int high, int(*c)(A x, A y))
  48. {
  49. int i = low; A t = a[low];
  50. for(int j = low+1; j < high; ++j)
  51. {
  52. if(c(a[j], t)<= 0)
  53. {
  54. i++;
  55. if(i!=j) exchange(a, i, j);
  56. }
  57. }
  58. exchange(a, low, i);
  59. return i;
  60. }
  61.  
  62. void _f42(A a[], int low, int high, int(*c)(A x, A y))
  63. {
  64. if(low < high)
  65. {
  66. int p = _f41(a, low, high, c);
  67. _f42(a, low, p, c);
  68. _f42(a, p+1, high, c);
  69. }
  70. }
  71.  
  72. void f4(A a[], int l, int(*c)(A x, A y))
  73. {
  74. _f42(a, 0, l, c);
  75. }

An array is declared as below:

  1. A a[5] = {{3,4},{6,5},{2,7},{3,1},{1,2}};

Which of the function calls can transform it into:

  1. {{1,2},{2,7},{3,1},{3,4},{6,5}}

A. f1(a,5,cmp)           B. f2(a,5,cmp)         C. f3(a,5,cmp)         D. f4(a,5,cmp)        E. None of the above

注: 排序算法稳定性问题

20. A particular BNF definition for a "word" is given by the following rules:

Which of the following lexical entieies can be derived from <word>? I. abcd II. bcdef III.d22

A. None          B. I and II only  C. I and III only            D. II and III only    E. I,II and III

作者:bigwangdi 
出处:http://www.cnblogs.com/bigwangdi/ 
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。 
Stay Hungry, Stay Foolish!!

 

Microsoft2013校园招聘笔试题的更多相关文章

  1. Microsoft2013校园招聘笔试题及解答

    继续求拍砖!!!! 1. You are managing the database of a book publichser, you currently store the book orders ...

  2. 2014 WAP校园招聘笔试题

    2014 WAP校园招聘笔试题 Problem's Link:   http://www.doc88.com/p-6751117015483.html WAP公司笔试题 We are planning ...

  3. google2013校园招聘笔试题(全国)

    google2013校园招聘笔试题 1. 单项选择题1.1如果把传输速率定义为单位时间内传送的信息量(以字节计算)多少.关于一下几种典型的数据传输速率:1.使用USB2.0闪存盘,往USB闪存盘上拷贝 ...

  4. Microsoft 2013校园招聘笔试题及解答

    Microsoft 2013校园招聘笔试题及解答 题目是自己做的,求讨论.吐槽.拍砖 1.      Which of the following callingconvension(s) suppo ...

  5. C# - 2017微软校园招聘笔试题 之 MS Recognition[待解决]

    MS Recognition 在线提交: hihoCoder 1402 http://hihocoder.com/problemset/problem/1402 类似: OpenJudge - I:P ...

  6. 京东2017校园招聘笔试题 【第K个幸运数】

    题目描述 4和7是两个幸运数字,我们定义,十进制表示中,每一位只有4和7两个数的正整数都是幸运数字. 前几个幸运数字为:4,7,44,47,74,77,444,447... 现在输入一个数字K,输出第 ...

  7. 九度OJ 1531 货币面值(网易游戏2013年校园招聘笔试题) -- 动态规划

    题目地址:http://ac.jobdu.com/problem.php?pid=1531 题目描述: 小虎是游戏中的一个国王,在他管理的国家中发行了很多不同面额的纸币,用这些纸币进行任意的组合可以在 ...

  8. PPS2013校园招聘笔试题

    转载请标明出处,原文地址:http://blog.csdn.net/hackbuteer1/article/details/11473405 一.简答题 (1)一位老师有2个推理能力很强的学生,他告诉 ...

  9. 2012Google校园招聘笔试题

    1.已知两个数字为1~30之间的数字,甲知道两数之和,乙知道两数之积,甲问乙:“你知道是哪两个数吗?”乙说:“不知道”.乙问甲:“你知道是哪两个数吗?”甲说:“也不知道”.于是,乙说:“那我知道了”, ...

随机推荐

  1. HDU 4052 Adding New Machine(矩形面积并)

    Adding New Machine Problem Description Incredible Crazily Progressing Company (ICPC) suffered a lot ...

  2. hibernate缓存机制和事务隔离机制

    一级缓存( Session缓存) }         一级缓存的管理 ◦          应用程序调用Session的save().update().saveOrUpdate().get()或loa ...

  3. (C语言)共用体union的使用方法举例

    曾经在学校学习C语言的时候一直搞不懂那个共用体union有什么用的.工作之后才发现它的一些妙用,现举比例如以下: 1. 为了方便看懂代码. 比方说想写一个3 * 3的矩阵,能够这样写: [ 注:以下用 ...

  4. NYOJ 14 场地安排(它可以被视为一个经典问题)

    会场安排问题 时间限制:3000 ms  |  内存限制:65535 KB 难度:4 描写叙述 学校的小礼堂每天都会有很多活动.有时间这些活动的计划时间会发生冲突,须要选择出一些活动进行举办.小刘的工 ...

  5. MongoDB的upsert状态判断和pymongo使用方法

    在mongo中,有一个命令非常的方便,就是upsert,顾名思义就是update+insert的作用 根据条件判断有无记录,有的话就更新记录,没有的话就插入一条记录 upsert的使用方法: Mong ...

  6. Windows 8 常用第三方SDK使用概览

    原文:Windows 8 常用第三方SDK使用概览 应用开发过程中,我们或多或少会使用到第三方的公司平台的功能,例如:新浪微博.人人网.高德地图等. 那么在Windows 8 Store App开发中 ...

  7. Extjs中GridPanel的各个属性与方法

    1.Ext.grid.GridPanel 主要配置项: store:表格的数据集 columns:表格列模式的配置数组,可自动创建ColumnModel列模式 autoExpandColumn:自动充 ...

  8. JSFIDDLE 动力 Threejs 功能探秘

    JSFIDDLE 助力 WebGL 功能探秘 太阳火神的漂亮人生 (http://blog.csdn.net/opengl_es) 本文遵循"署名-非商业用途-保持一致"创作公用协 ...

  9. VS 文件自动定位功能

    在Visual Studio 中,当你在所有打开的文件中进行切换时,在Solution Explorer中也会自定定位到这个文件的目录下面,这个功能用来查找当前文件是非常有用.在Tools->O ...

  10. Android开源框架Volley(Google IO 2013)源代码及内部实现分析

    1.Volley概述 在项目开发过 程中,博主曾写过大量的访问网络重复代码,特别是ListView adapter很难避免getView()方法不被重复调用,如果ImageView不利用缓存机制,那么 ...