欢迎来到天天文库
浏览记录
ID:57614688
大小:79.00 KB
页数:20页
时间:2020-08-29
《系统级编程复习-选择题.doc》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、//////////////////////选择题week02////////////////////////////////////////////////////1.Whichofthefollowingcouldberepresentedbyonebitofinformation?(a)thepositionofalightswitch(b)thecolorofasinglepixelonatrue-colorcomputerdisplay(c)anASCIIcharacter(d)thecurre
2、ntchannelofatelevisionreceiver2.InC,whatisthefollowingbinarynumberinhexadecimal?11010101(a)0xB5(b)0xD5(c)0xAB(d)0x5D3.WhatisthevalueofthefollowingCexpression?0x1234^0x5432(a)0x1030(b)0x5434(c)0x4606(d)0x56364.WhatisthevalueofthefollowingCexpression?0x1234
3、&0x5432(a)0x6666(b)0x1111(c)0x1030(d)0x56365.Howis46(decimal)representedinan8-bit2'scomplementbinaryformat?(a)00101110(b)01000110(c)00101100(d)000111106.Howis-10(decimal)representedinan8-bit2'scomplementbinaryformat?(a)10001010(b)11110110(c)11110101(d)111
4、110107.Inacomputerwith4-bytewords,whichofthefollowingCexpressionstestswhetherptrcontainstheaddressofaword?(ptr&3)==0(ptr
5、3)==0(ptr%4)==0(a)IIonly(b)IIIonly(c)IandIIIonly(d)Ionly8.WhathappensinaCprogramwhenanadditionwouldcauseintegeroverflow?(a)Executionis
6、terminated.(b)Anexception-handleriscalledwiththetwooperandsasparameters.(c)Anincorrectresultisproducedandexecutioncontinues.(d)Thecorrectvalueiscoercedtoafloatingpointnumber.9.Whatisthepurposeoftheexponentinfloatingpointnumbers?(a)toindicatewherethedecima
7、lorbinarypointshouldbe(b)tospecifythebaseasbinary,octal,orhexadecimal(c)tospecifythesuperscript(d)themantissaisraisedtothepoweroftheexponent10.Whichofthefollowingstatementsaboutfloating-pointnumbersinCistrue?Floating-pointnumbersareoftenonlyapproximations
8、ofrealnumbers.A32-bitfloatonlyapproximatesdecimalfractions,buta64-bitdoublerepresentsthemexactly.Floating-pointnumberscanrepresentanyrationalrealnumberbutnotirrationals.(a)IandIIonly(b)Ionly(c)IIonly(d)IandIIIonly11.Whichofthefollowingnumericaloperationsi
9、smostlikelytoleadtolossofprecision?(a)Integermultiplication(b)Integeraddition(c)Floating-pointaddition(d)Floating-pointmultiplication12.InC,usingdefaultfloatingpointsettings,whathappenswhenafloating-pointcomputation
此文档下载收益归作者所有