微软暑假实习生笔试题

微软暑假实习生笔试题

ID:39430064

大小:18.41 KB

页数:11页

时间:2019-07-03

微软暑假实习生笔试题_第1页
微软暑假实习生笔试题_第2页
微软暑假实习生笔试题_第3页
微软暑假实习生笔试题_第4页
微软暑假实习生笔试题_第5页
资源描述:

《微软暑假实习生笔试题》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库

1、2012MicrosoftInternHiringWrittenTest1.SupposethataSelectionSortof80itemshascompleted32iterationsofthemainloop.Howmanyitemsarenowguaranteedtobeintheirfinalspot(nevertobemovedagain)?(A)16(B)31(C)32(D)39(E)402.WhichSynchronizationmechanism(s)is/areusedtoavoidraceconditionsamongprocesses/t

2、hreadsinoperatingsystems?(A)Mutex(B)Mailbox(C)Semaphore(D)Localprocedurecall3.Thereisasequenceofnnumbers1,2,3,..,nandastackwhichcankeepmnumbersatmost.Pushthennumbersintothestackfollowingthesequenceandpopoutrandomly.Supposenis2andmis3,theoutputsequencemaybe1,2or2,1,soweget2differentsequ

3、ences.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.Whatistheresultofbinarynumber01011001aftermultiplyingby0111001andadding1101110?(A)0001010000111111(B)0101011101110011(C)00110100001101015.

4、Whatisoutputifyoucompileandexecutethefollowingcode?voidmain(){inti=11;intconst*p=&i;p++;printf("%d",*p);}(A)11(B)12(C)Garbagevalue(D)Compileerror(E)Noneofabove6.WhichoffollowingC++codeiscorrect?(A)intf(){int*a=newint(3);return*a;}(B)int*f(){inta[3]={1,2,3};returna;}(C)vectorf(){ve

5、ctorv(3);returnv;}(D)voidf(int*ret){inta[3]={1,2,3};ret=a;return;}7.Giventhatthe180-degreerotatedimageofa5-digitnumberisanother5-digitnumberandthedifferencebetweenthenumbersis78633,whatistheoriginal5-digitnumber?(A)60918(B)91086(C)18609(D)10968(E)869018.Whichofthefollowingstatemen

6、tsaretrue?(A)Wecancreateabinarytreefromgiveninorderandpreordertraversalsequences.(B)Wecancreateabinarytreefromgivenpreorderandpostordertraversalsequences.(C)Foranalmostsortedarray,insertionsortcanbemoreeffectivethanQuicksort.(D)SupposeT(n)istheruntimeofresolvingaproblemwithnelements,T(

7、n)=Θ(1)ifn=1;T(n)=2T(n/2)+Θ(n)if>1;soT(n)isΘ(nlogn).(E)Noneoftheabove.9.Whichofthefollowingstatementsaretrue?(A)Insertionsortandbubblesortarenoteffcientforlargedatasets.(B)QuicksortmakesO(n^2)comparisonsintheworstcase.(C)Thereisanarray:7,6,5,4,3,2,1.Ifusingselectionsort(ascending),th

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

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

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