Microsoft 2013校园招聘笔试题及解答
Microsoft 2013校园招聘笔试题及解答
题目是自己做的,求讨论、吐槽、拍砖
1. Which of the following callingconvension(s) support(s) support variable length parameter(e.g. printf)? (3Points)
A. cdecl B. stdcall C.pascal D. fastcall
分析:<来自百科>
2. What’s the output of thefollowing code?(3 Points)

class A
{
public:
virtual void f()
{
cout<<”A::f()”<<endl;
}
void f()const
{
cout<<”A::f()const”<<endl;
}
}; class B : public A
{
public:
void f()
{
cout<<”B::f()”<<endl;
}
void f() const
{
cout<<”B::f()const”<<endl;
}
}; void g(const A* a)
{
a->f();
} int main()
{
A* a = newB();
a->f();
g(a);
delete a;
}

A: B::f() B::f() const B: B::f() A::f() const C: A::f() B::f() const D: A::f() A::f() const
3. What is the different between a linked list and an array?
A. Search complexity when both are sorted
B. Dynamically add/remove
C. Random access effficiency
D. Data storage type
4. About the Thread and Process in Windows, which description(s) is (are) correct:
A. One application in OS must have one Process, but not a necessary to have one Thread.
B. The Process cound have its own Stack but the thread only could share the Stack of its parent Process.
C. Thread must belongs to a Process
D. Thread could change its belongiing Process
5. What is the output of the following code?

{
int x = 10;
int y = 10;
x = x++;
y = ++y;
printf("%d,%d\n", x, y);
}

A. 10, 10 B. 10, 11 C. 11, 10 D. 11. 11
分析:该代码为定义,但是结果是D。
6. For the following Java or C# code
int[][] myArray3 = new int[3][]{
new int[3]{5,6,2},
new int[5]{6,9,7,8,3},
new int[2]{3,2}
};
what will
myArray3[2][2]
returns?
A. 9 B. 2 C. 6 D. overflow
7. Please choose the right statement about const usage:
A. const int a; //const integer
B. int const a; //const integer
C. int const *a; //a pointer which point to const integer
D. const int *a; //a const pointer which point to integer
E. int const *a; //a const pointer which point to integer
8. Given the following code:

#include <iostream>
class A
{
public:
long a;
};
class B : public A
{
long b;
};
void seta(A* data, int idx)
{
data[idx].a = 2;
} int _tmain(int argc, _TCHAR* 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;
}

which is the correct result?
A. 11111111 B. 12121212 C. 11112222 D.21212121
答案:22221111
9. 1 of 1000 bottles of water is poisoned which will kill a rat in 1 week if the rat drunk a mount of the water. Given the bottles of water have no visual difference, how many rats are needed at least to find the poisoned one in 1 week?
A. 9 B. 10 C. 32 D. 999 E. None of the above
10. Which of following statement(s) equal(s) value 1 in C programming language?
A. the return value of main function if program ends normally.
B. return (7 & 1);
C. char *str = "microsoft"; return str == "microsoft";
D. return "microsoft" = "microsoft";
E. None of the above.
11. If you computed 32 bit signed integers F and G from 32 bit signed integers X using F = X/2 and G=(X>>1),and you found F!=G, this implies that
A. There is a complier error B. X is odd C. X is negative D. F - G = 1 E. G - F = 1
12. How many rectangles you can find from 3*4 grid?
A. 18 B. 20 C.40 D 60 E. None of above is correct
13. One line can split a surface to 2 part, 2 line can split a surface to 4 part. Give 100 lines, no tow parallel lines, no tree lines join at the same point, how many parts can 100 line split?
A. 5051 B. 5053 C. 5510 D. 5511
分析:递推公式:x(n) - x(n-1) = n , x(0) = 1
14. Which of the following sorting algorithm(s) is (are) stable sorting?
A. bubble sort B. quicksort C. heap sort D. merge sort E. Selection sort
15. Model-View-Controller(MVC) is an architectural pattern that frequently used in web applications. Which of the following statement(s) is(are) correct:
A. Models often represent data and the business logics needed to manipulate the data in the application
B. A view is a (visual) representation of its model. It renders the model into a form suitable for interaction, typically a user interface element.
C. A controller is the link between a user and the system. It accepts input from the user and instructs the model and a view to perform actions based on that input.
D. The common practice of MVC in web application is, the model receives GET or POST input from user and decides what to do with it, handing over to controller and which hand control to views(HTML- generating components)
E. None of the above
16. We can reover the binary tree if given the ouput of
A. Preorder traversal and inorder traversal
B. Preorder traversal and postorder traversal
C. Inorder traversal and postorder traversal
D. Postorder traversal
17. Given a string with n characters, suppose all the characters are different from each other, how many different substrings do we have?
A. n+1 B. n^2 C. n(n+1)/2 D. 2^n -1 E. n!
18. Given the following database table, how many rows will the following SQL statement update?
update Books set NumberOfCopies=NumberOfCopies+1 Where AuthorID in
Select AuthorID from Books
group by AuthorID
having sum(NumberOfCopies)<=8
A. 1 B. 2 C. 3 D. 4 E. 5
19. What is the shortest path between node S and node T, given the graph below? Note: the numbers represent the length of the connected nodes.
A. 17 B. 18 C. 19 D. 20 E. 21
20. Given a set of N balls and one of which is defective (weighs less than others), you are allowed to weigh with a balance 3 times to find the defective. Which of the following are possible N?
A. 12 B. 16 C. 20 D. 24 E. 28
作者:bigwangdi
出处:http://www.cnblogs.com/bigwangdi/
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。
Stay Hungry, Stay Foolish!!
Microsoft 2013校园招聘笔试题及解答的更多相关文章
- Microsoft2013校园招聘笔试题及解答
继续求拍砖!!!! 1. You are managing the database of a book publichser, you currently store the book orders ...
- google2013校园招聘笔试题(全国)
google2013校园招聘笔试题 1. 单项选择题1.1如果把传输速率定义为单位时间内传送的信息量(以字节计算)多少.关于一下几种典型的数据传输速率:1.使用USB2.0闪存盘,往USB闪存盘上拷贝 ...
- 2014 WAP校园招聘笔试题
2014 WAP校园招聘笔试题 Problem's Link: http://www.doc88.com/p-6751117015483.html WAP公司笔试题 We are planning ...
- Microsoft2013校园招聘笔试题
Microsoft2013校园招聘笔试题 继续求拍砖!!!! 1. You are managing the database of a book publichser, you currently ...
- C# - 2017微软校园招聘笔试题 之 MS Recognition[待解决]
MS Recognition 在线提交: hihoCoder 1402 http://hihocoder.com/problemset/problem/1402 类似: OpenJudge - I:P ...
- 九度OJ 1531 货币面值(网易游戏2013年校园招聘笔试题) -- 动态规划
题目地址:http://ac.jobdu.com/problem.php?pid=1531 题目描述: 小虎是游戏中的一个国王,在他管理的国家中发行了很多不同面额的纸币,用这些纸币进行任意的组合可以在 ...
- 京东2017校园招聘笔试题 【第K个幸运数】
题目描述 4和7是两个幸运数字,我们定义,十进制表示中,每一位只有4和7两个数的正整数都是幸运数字. 前几个幸运数字为:4,7,44,47,74,77,444,447... 现在输入一个数字K,输出第 ...
- PPS2013校园招聘笔试题
转载请标明出处,原文地址:http://blog.csdn.net/hackbuteer1/article/details/11473405 一.简答题 (1)一位老师有2个推理能力很强的学生,他告诉 ...
- 2012Google校园招聘笔试题
1.已知两个数字为1~30之间的数字,甲知道两数之和,乙知道两数之积,甲问乙:“你知道是哪两个数吗?”乙说:“不知道”.乙问甲:“你知道是哪两个数吗?”甲说:“也不知道”.于是,乙说:“那我知道了”, ...
随机推荐
- .NET Framework 各版本区别
.NET Framework 各版本区别 .NET Framework 1.1 自1.0版本以来的改进:自带了对mobile asp .net控件的支持.这在1.0版本是以附加功能方式实现的,现在已经 ...
- Access denied for user: 'root@localhost' (Using password: YES)
centos 设备mysql成功后 首次使用root登录发生:Access denied for user: 'root@localhost' (Using password: YES) 因为mysq ...
- linux 多个源文件在编译时会产生一个目标文件
obj-m := target.o target-objs := src1.o src2.o src3.o 版权声明:本文博客原创文章.博客,未经同意,不得转载.
- APP-随身听
简单到复杂听你的专属音响界,听金融.听物业,听新闻和其他节目专辑,简要介绍了新的音频应用,给你不一样的聆听体验.还记得老歌做?这里有.您留声机的一部分!很简单的音频应用,随时随地与此应用程序来听你的私 ...
- ios背景更新和下载
ios背景更新和下载 by 吴雪莹 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NS ...
- MvcPager分页控件以适用Bootstrap
随笔- 9 文章- 0 评论- 33 修改MvcPager分页控件以适用Bootstrap 效果(含英文版,可下载) 软件开发分页效果必不可少,对于Asp.Net MVC 而言,MvcPag ...
- [译]在运行时内存中的Java对象是怎么样的
(文章翻译自What do Java objects look like in memory during run-time?) 我们知道函数在内存中是作为一个活动记录栈来实现的.而且我们知道Java ...
- mysql编码的那点事
Mysql编码问题 在php页面可以向mysql插入英文字符,但就是不能插入中文字符,在cmd客户端也可从插入,这是困扰我两天的问题. 在网上找了很多资料,最终确定了是字符编码这个地方出现了问题,首 ...
- HTTP 报文中的 Header 字段进行身份验证
[小技巧][ASP.Net MVC Hack] 使用 HTTP 报文中的 Header 字段进行身份验证 在一些 Web 系统中,身份验证是依靠硬件证书进行的:在电脑上插入 USB 证书,浏览器插件读 ...
- Mysql高级之游标
原文:Mysql高级之游标 什么是游标?select 语句也许一次性会取出来n条语句,那么游标便可以一次取出来select中的一条记录.每取出来一条,便向下移动一次!可以实现很复杂逻辑! 上面还有有一 ...