微软2012暑期实习题

微软2012暑期实习题

ID:37768540

大小:15.69 KB

页数:5页

时间:2019-05-30

微软2012暑期实习题_第1页
微软2012暑期实习题_第2页
微软2012暑期实习题_第3页
微软2012暑期实习题_第4页
微软2012暑期实习题_第5页
资源描述:

《微软2012暑期实习题》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库

1、微软暑假实习生笔试题2012MicrosoftInternHiringWrittenTest1.SupposethataSelectionSortof80itemshascompleted32iterationsofthemainloop.Howmanyitemsarenowguaranteedtobeintheirfinalspot(nevertobemovedagain)?(A)16(B)31(C)32(D)39(E)402.WhichSynchronizationmechanism(s)is/a

2、reusedtoavoidraceconditionsamongprocesses/threadsinoperatingsystems?(A)Mutex(B)Mailbox(C)Semaphore(D)Localprocedurecall3.Thereisasequenceofnnumbers1,2,3,..,nandastackwhichcankeepmnumbersatmost.Pushthennumbersintothestackfollowingthesequenceandpopoutrand

3、omly.Supposenis2andmis3,theoutputsequencemaybe1,2or2,1,soweget2differentsequences.Supposenis7andmis5,pleasechoosetheoutputsequencesofthestack:(A)1,2,3,4,5,6,7(B)7,6,5,4,3,2,1(C)5,6,4,3,7,2,1(D)1,7,6,5,4,3,2(E)3,2,1,7,5,6,44.Whatistheresultofbinarynumber

4、01011001aftermultiplyingby0111001andadding1101110?(A)0001010000111111微软暑假实习生笔试题(B)0101011101110011(C)00110100001101015.Whatisoutputifyoucompileandexecutethefollowingcode?voidmain(){inti=11;intconst*p=&i;p++;printf("%d",*p);}(A)11(B)12(C)Garbagevalue(D)C

5、ompileerror(E)Noneofabove6.WhichoffollowingC++codeiscorrect?(A)intf(){int*a=newint(3);return*a;}(B)int*f(){inta[3]={1,2,3};returna;}(C)vectorf(){vectorv(3);returnv;}(D)voidf(int*ret){inta[3]={1,2,3};ret=a;return;}7.Giventhatthe180-degreerotate

6、dimageofa5-digitnumberisanother5-digitnumberandthedifferencebetweenthenumbersis78633,whatistheoriginal5-digitnumber?(A)60918(B)91086(C)18609(D)10968(E)869018.Whichofthefollowingstatementsaretrue?(A)Wecancreateabinarytreefromgiveninorderandpreordertraver

7、salsequences.(B)Wecancreateabinarytreefromgivenpreorderandpostordertraversalsequences.(C)Foranalmostsortedarray,insertionsortcanbemoreeffectivethanQuicksort.(D)SupposeT(n)istheruntimeofresolvingaproblemwithnelements,T(n)=Θ(1)ifn=1;T(n)=2T(n/2)+Θ(n)if>1;

8、soT(n)isΘ(nlogn).(E)Noneoftheabove.9.Whichofthefollowingstatementsaretrue?(A)Insertionsortandbubblesortarenoteffcientforlargedatasets.(B)QuicksortmakesO(n^2)comparisonsintheworstcase.(C)Thereisanarray:7,6,5,4,3,2,1.Ifusingselecti

当前文档最多预览五页,下载文档查看全文

此文档下载收益归作者所有

当前文档最多预览五页,下载文档查看全文
温馨提示:
1. 部分包含数学公式或PPT动画的文件,查看预览时可能会显示错乱或异常,文件下载后无此问题,请放心下载。
2. 本文档由用户上传,版权归属用户,天天文库负责整理代发布。如果您对本文档版权有争议请及时联系客服。
3. 下载前请仔细阅读文档内容,确认文档内容符合您的需求后进行下载,若出现内容与标题不符可向本站投诉处理。
4. 下载文档时可能由于网络波动等原因无法下载或下载错误,付费完成后未能成功下载的用户请联系客服处理。