- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
微软2013暑期实习生笔试题
答案仅供参考-更改了部分个人认为不严谨的答案,以及一点点注释1. Which of the following calling convention(s) support(s) supportvariable-length parameter(e.g. printf)?(3 Points) A. cdecl? B. stdcall? C. pascal?D. fastcall注:可变参数函数需要由调用者清栈,因为当前函数并不知道要有多少参数被传入,所以必须用cdcel2. Whats the output of the following code?(3 Points)class?A??{??public:???virtual?void?f()???{???coutA::f()endl;???}???void?f()?const??{???coutA::f()?constendl;???}??};???class?B:?public?A??{??public:???void?f()???{???coutB::f()endl;???}???void?f()?const??{???coutB::f()?constendl;???}??};???void?g(const?A*?a)??{???a-f();??}???int?main()??{???A*?a?=?new?B();???a-f();???g(a);???delete?a?;??}?? A. B::f()B::f()const B. B::f()A::f()const ? C. A::f()B::f()constD.?A::f()A::f()const?注:const类指针只可以调用const类方法3. What is the difference between a linked list and an array?(3 Points) A. Search complexity when both are sorted B. Dynamically add/remove C. Random access efficiency D. Data storage type4. About the Thread and Process in Windows, which description(s) is(are) correct:(3 Points) A. One application in OS must have one Process, but not a necessary to have one Thread B. The Process could 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 belonging Process5. What is the output of the following code?(3 Points){???int?x?=?10?;???int?y?=?10?;???x?=?x++?;???y?=?++y?;???printf(%d,?%d\n,x,y);??}?? A. 10, 10? B. 10, 11 C. 11, 10D. 11, 11注:这是道错题。根据ANSI/ISO C标准描述:“在上一个和下一个序列点之间,一个对象所保存的值至多只能被表达式的求值修改一次,而且只有在确定将要保存的值的时候才能访问前一个值。”像x=x++,y=++y这样两次修改同一个变量的表达式是绝不允许的(或者,无论如何都无需明确定义,也就是说,无需知道它们到底做什么,编译器也不必支持它们。)引用至《你必须知道的495个C语言问题》,人民邮电出版社,37页这种题多见于谭浩强老爷爷出的C教程书。可想而知微软程序员也是看这本书长大的。6. For the following Java or C# code(3 Points)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. overflow7. Please choose the right statement about const usage:(3 Points) A. const int a; /
文档评论(0)