Test Bank for C How To Program 9th Us Edition by Deitel

Page 1


Error! Reference source not found.

1.1Q1:Whichofthefollowingstatementsis true?

a.Hardwarecontrolssoftware.

b.Softwarecontrolshardware.

c.Cisanobject-orientedprogramminglanguage.

d.Both(b)and(c)are true

ANS: b.

1.1Q2:Whichofthefollowingstatementsa),b)orc)is false?

a.Decadesago,mostcomputerapplicationsranonnetworkedcomputers.

b.Today'sapplicationscanbewrittenwiththeaimofcommunicatingamong theworld'scomputersviatheInternet.

c.Akeyintersectionbetweencomputerscienceanddatascienceisartificialintelligence.

d.Alloftheabovestatementsare true

ANS: a. Decades ago, most computer applications ran on networked computers. Actually, decades ago, most computer applications ran on "standalone" computers (that is, not networked together).

Error! Reference source not found.

1.2Q1:Whichofthefollowingstatementsis false?

a.Computerscanperformcalculationsandmakelogicaldecisionsphenomenally fasterthanhumanbeingscan.

b.Computersprocessdataunderthecontrolofsequencesofinstructionscalled computerprograms(orsimplyprograms).

c.Acomputerconsistsofvariousphysicaldevicesreferredtoashardware(such asthekeyboard,screen,mouse,solid-statedisks,harddisks,memory,

d.Computingcostsarerisingdramatically,duetotheincreasingcomplexityof hardwareandsoftwaretechnologies.

ANS: d. Actually, computing costs are dropping dramatically, due to rapid developments in hardware and software technologies.

Error! Reference source not found.

1.2Q2:Everyyearortwo,thecapacitiesofcomputershaveapproximatelydoubledinexpensively.Thisremarkabletrendofteniscalled________.

a.thelawoflargenumbers

b.theprincipalofleastprivilege

c.Moore'slaw

d.Wirth'slaw

ANS: c.

Error! Reference source not found.

1.2Q3:Whichlogicalunitofthecomputeristhereceivingsection?

a.inputunit

b.outputunit

c.memoryunit

d.centralprocessingunit.

ANS: a.

1.2Q4:Informationinthememoryunitis________.It'stypicallylostwhenthe computer'spoweristurnedoff.

a.persistent

b.constant

c.sticky

d.volatile

ANS: d.

1.2Q5:Agigabyteisapproximatelyone________bytes.

a.thousand

b.million

c.billion

d.trillion.

ANS: c.

1.2Q6:Thearithmeticandlogicunitcontainsthe________mechanismsthatallow thecomputer,forexample,tocomparetwoitemsfromthememoryunittodeterminewhetherthey'reequal.

a.decision

b.calculation

c.addition

d.Noneoftheabove.

ANS: a.

1.2Q7:Informationonsecondarystoragedevicesis________ it'spreserved evenwhenthecomputer'spoweristurnedoff.

a.volatile

b.unstable

c.transient

d.persistent

ANS: d.

1.2Q8:Secondarystorageinformationtakesmuch________toaccessthaninformationinprimarymemory,butitscostperunitismuch________.

a.lesstime,less

b.longer,less

c.lesstime,more

d.longer,more

ANS: b.

Error! Reference source not found.

1.3Q1:A(n)________isthesmallestdataiteminacomputer.Itcanhavethevalue 0 or 1.

a.bit

b.byte

c.field

d.record

ANS: a.

1.3Q2:Whichofthefollowingstatementsa),b)orc)is false?

a.Acomputer'scharactersetrepresentseverycharacterasapatternof 1sand 0s.

b.AllUnicode® charactersarecomposedoffourbytes(32bits).

c.Unicodecontainscharactersformanyoftheworld'slanguages.

d.Alloftheabovestatementsaretrue.

ANS: b. Actually, Unicode® characters are composed of one, two, three or four bytes (8, 16, 24 or 32 bits, respectively).

1.3Q3:Themostpopulardatabasemodelisthe________database,inwhichdata isstoredinsimpletables.

a.network

b.graph

c.relational

d.hierarchical

ANS: c.

1.3Q4:Whichoneofthefollowingstatementsis true?

a.aterabyteislargerthanapetabyte.

b.akilobyteisexactly1000bytes.

c.agigabyteis1024megabytes.

d.anexabyteis1024zettabytes.

ANS: c.

Error! Reference source not found.

1.4Q1:Whichofthefollowingstatementsa),b)orc)is false?

a.Anycomputercandirectlyunderstandonlyitsownmachinelanguage,definedbyitshardwaredesign.

b.Translatorprogramscalledassemblersconvertassembly-languageprograms

tomachinelanguageatcomputerspeeds.

c.Interpreterprograms,developedtoexecutehigh-levellanguageprogramsdirectly,avoidthedelayofcompilation,andrunfasterthancompiledprograms.

d)Alloftheabovestatementsare true.

ANS: c. Actually, interpreter programs run slower than compiled programs.

1.4Q2:Whichofthefollowingstatementsisfalse?

a.Withtheadventofassemblylanguages,computerusageincreasedrapidly,but programmersstillhadtousenumerousinstructionstoaccomplisheventhe simplesttasks.

b.Tospeedtheprogrammingprocess,high-levellanguagesweredevelopedin whichsinglestatementscouldbewrittentoaccomplishsubstantialtasks.

c.Translatorprogramscalledassemblersconverthigh-level-languagesource codeintomachinelanguage.

d.High-levellanguagesinstructionslookalmostlikeevery-dayEnglishandcontaincommonlyusedmathematicalnotations.

ANS: c. Actually, those translator programs are compilers. Assemblers convert assembly language programs into machine language.

Error! Reference source not found.

1.5Q1:Windowsisa(n)________operatingsystem it'scontrolledbyMicrosoft exclusively.

a.proprietary

b.private

c.opensource

d.Noneoftheabove.

ANS: a.

1.5Q2: _____isbyfartheworld'smostwidelyuseddesktopoperatingsystem.

a.Linux

b.MacOS

c.Windows

d.noneoftheabove

ANS: c.

1.5Q3:With________softwaredevelopment,individualsandcompaniescontributetheireffortsindeveloping,maintainingandevolvingsoftwareinexchange fortherighttousethatsoftwarefortheirownpurposes,typicallyatnocharge.

a.object-oriented

b.high-level

c.open-source

d.proprietary

ANS: c.

1.5Q4:Whichofthefollowingorganizationshasmillionsofopen-sourceprojectsunderdevelopment?

a.PythonSoftwareFoundation

b.GitHub

c.TheApacheSoftwareFoundation

d.TheEclipseFoundation

ANS: b.

Error! Reference source not found.

1.6Q1:WhichofthefollowinglanguageswasanancestorofC?

a.A

b.A+

c.B

d.B+

ANS: c.

Error! Reference source not found.

1.7Q1:Whichofthefollowingaresourcesofbuildingblocksthatyou’llusetobuild yourCprograms?

a.FunctionsfromtheCstandardlibrary

b.Functionsyoucreateyourself.

c.Functionsfromopen-sourceClibraries.

d.Alloftheabove.

ANS: d.

1.7Q2:Whichofthefollowingaretrueregardingwhystandardlibraryfunctions canbemoreefficient?

a.Theysaveprogrammingtime.

b.Theyarecarefullywrittentoperformoptimally.

c.Theyincreaseprogramportability.

d.Alloftheabove.

ANS: d.

Error! Reference source not found.

1.8Q1:C++wasdevelopedby________.

a.BjarneStroustrup

b.AdaLovelace

c.BlaisePascal

d.KenThompson

ANS: a.

1.8Q2:WhichlanguagewasdevelopedbyMicrosoftforintegratingtheInternetand thewebintocomputerapplications?

a.Objective-C.

b.Java.

c.PHP.

d.C#.

ANS: d.

1.8Q3:Javawasdevelopedby___________.

a.SunMicrosystems

b.BellLabs

c.IBM

d.ANSI/ISO

ANS: a.

Error! Reference source not found.

1.9Q1:The compile stageiswhen____________.

a.theobjectcodeislinkedwithcodeforfunctionsinotherfiles

b.theCprogramistranslatedintomachinelanguagecode

c.theprogramisexecutedoneinstructionatatime

d.theprogramisplacedinmemory

ANS: b.

1.9Q2:Thelinkercreates__________.

a.anexecutableimage

b.apreprocessordirective

c.objectcode

d.aninputstream

ANS: a.

Error! Reference source not found.

Noquestions.

Error! Reference source not found.

1.11Q1:WhichofthefollowingstatementsabouttheARPANETandtheInternet is false?

a.TheARPANETwastheprecursortotoday'sInternet.

b.Today'sfastestInternetspeedsareontheorderofmillionsofbitspersecond withbillion-bits-per-second(gigabit)speedsalreadybeingtested.

c.AlthoughtheARPANETenabledresearcherstonetworktheircomputers,its mainbenefitprovedtobethecapabilityforquickandeasycommunicationvia

Copyright 2016 by Pearson Education, Inc., Hoboken, NJ. All Rights Reserved.

whatcametobeknownaselectronicmail(e-mail).

d.Theprotocol(setofrules)forcommunicatingovertheARPANETbecame knownastheTransmissionControlProtocol(TCP).TCPensuredthatmessages, consistingofsequentiallynumberedpiecescalledpackets,wereproperlydeliveredfromsendertoreceiver,arrivedintactandwereassembledinthecorrect order.

ANS: b. Actually, today's fastest Internet speeds are on the order of billions of bits per second with trillion-bits-per-second (terabit) speeds already being tested.

Error! Reference source not found.

1.11Q2:WhichofthefollowingstatementsabouttheInternetis false?

a.Onechallengewastoenabledifferentnetworkstocommunicatewitheach other.ARPAaccomplishedthisbydevelopingtheInternetProtocol(IP),which createdatrue"networkofnetworks,"thecurrentarchitectureoftheInternet.

b.ThecombinedsetofInternetprotocolsisnowcalledTCP/IP.

c.EachInternet-connected-devicehasaTCPaddress auniquenumericalidentifierusedbydevicescommunicatingviaTCP/IPtolocateoneanotherontheInternet.

d.Bandwidth theinformation-carryingcapacityofcommunicationslines on theInternethasincreasedtremendously,whilehardwarecostshaveplummeted.

ANS: c. Each Internet-connected- device has a TCP address—a unique numerical identifier used by devices communicating via TCP/IP to locate one another on the Internet. Actually, each Internet-connected device has an IP address—a unique numerical identifier used by devices communicating via TCP/IP to locate one another on the Internet.

Error! Reference source not found.

1.11Q3:Whichofthefollowingstatementsis false?

a.TheWorldWideWebisacollectionofhardwareandsoftwareassociatedwith theInternetthatallowscomputeruserstolocateandviewdocuments(with variouscombinationsoftext,graphics,animations,audiosandvideos)onalmostanysubject.

b.In1989,TimBerners-LeeofCERN(theEuropeanOrganizationforNuclear Research)begandevelopingHyperTextMarkupLanguage(HTML)—thetechnologyforsharinginformationvia"hyperlinked"textdocuments.

c.Berners-LeealsowrotecommunicationprotocolssuchasJavaScriptObject Notation(JSON)toformthebackboneofhisnewhypertextinformationsystem, whichhereferredtoastheWorldWideWeb.

d.In1994,Berners-LeefoundedtheWorldWideWebConsortium(W3C),devotedtodevelopingwebtechnologies.

ANS: c. Actually, in 1989, Tim Berners-Lee of CERN (the European Organization for Nuclear Research) began developing HyperText Markup Language (HTML)—the technology for sharing information via "hyperlinked" text documents.

Error! Reference source not found.

1.11Q4:Theapplications-developmentmethodologyof________enablesyouto rapidlydeveloppowerfulsoftwareapplicationsbycombining(oftenfree)complementarywebservicesandotherformsofinformationfeeds.

a.cloudcomputing

b.designpatterns

c.proprietarycomputing

d.mashups

ANS: d.

Error! Reference source not found.

1.11Q5:TheInternetisnolongerjustanetworkofcomputers it'sanInternet ofThings.Athingisanyobjectwithwhichofthefollowing?

a.anIPaddress

b.theabilitytosenddataovertheInternet

c.insomecases,theabilitytoreceivedataovertheInternet

d.Thingscanhavealloftheabove.

ANS: d.

Error! Reference source not found.

1.12Q1:Reworkingprogramstomakethemclearerandeasiertomaintain whilepreservingtheircorrectnessandfunctionalityiscalled________.

a.refactoring

b.designpatterns

c.editing

d.Noneoftheabove.

ANS: a.

1.12Q2:Provenarchitecturesforconstructingflexibleandmaintainableobjectorientedsoftwarearecalled________.

a.refactoredarchitectures

b.softwareblueprints

c.engineeredarchitectures

d.designpatterns

ANS: d.

Error! Reference source not found.

1.13Q1:Whichofthefollowingstatementsaboutbigdatais false?

a.Forcomputerscientistsanddatascientists,dataisnowasimportantaswritingprograms.

b.Onemegabyteisexactlyonemillion(1,000,000)bytes.

c.AMarch2016AnalyticsWeekarticlestatedthatbytherewouldbeover50billiondevicesconnectedtotheInternet(mostofthemthroughtheInternetof Things),andby2020therewouldbe1.7megabytesofnewdataeverysecond foreverypersonontheplanet.

d.Thespeedatwhichquantumcomputersnowunderdevelopmentcouldoperateatissoextraordinarythatinonesecond,aquantumcomputertheoretically coulddostaggeringlymorecalculationsthanthetotalthathavebeendonebyall computerssincetheworld’sfirstcomputerappeared.

ANS: b. Actually, one megabyte is exactly 220 = 1024 x 1024 = 1,048,576 bytes.

1.13Q2:Whichofthefollowingstatementsaboutenergyconsumptionisfalse?

a.Accordingtoarecentarticle,energyuseforprocessingdatain2015was growingat20%peryearandconsumingapproximatelythreetofivepercentof theworld'spower.

b.Anotherenormouselectricityconsumeristheblockchain-basedcryptocurrencyBitcoin processingjustoneBitcointransactionusesapproximatelythe sameamountofenergyaspoweringtheaverageAmericanhomeforayear.

c.TheenergyusecomesfromtheprocessBitcoin"miners"usetoprovethat transactiondataisvalid.

d.Together,BitcoinandEthereum(anotherpopularblockchain-basedplatform andcryptocurrency)consumemoreenergyperyearthanFinland,Belgiumor Pakistan

ANS: b. Actually, processing just one Bitcoin transaction uses approximately the same amount of energy as powering the average American home for a week.

Error! Reference source not found.

1.13Q3:Whichofthefollowing"V'sofbigdata"isdescribedby"thevalidityof thedata isitcompleteandaccurate?Canwetrustthatdatawhenmakingcrucialdecisions?Isitreal?

a.Volume

b.Velocity

c.Variety

d.Veracity

ANS: d.

Error! Reference source not found. Noquestions.

Error! Reference source not found.

1.14Q1:OnceWazeconvertsaspokencommandtotext,itmustdeterminethe correctactiontoperform,whichrequires:

a.JSON

b.speechrecognition

c.naturallanguageprocessing

d.speechsynthesis

ANS: c.

1.14Q2:Eachofthefollowingstatementsaboutatypicalmobilesocialnavigationappis true and mostcapturestheessenceoftheapplication?

a.Theappprocessesmassiveamountsofcrowdsourceddata thatis,thedata that'scontinuouslysuppliedbyusersthroughtheirmobileGPS-baseddevices worldwide.

b.Theappusesspeechsynthesistospeakdrivingdirectionsandalertstoyou, andspeechrecognitiontounderstandyourspokencommands.

c.TheappusesyourphoneasastreamingInternetofThings(IoT)device.Each phoneisaGPSsensorthatcontinuouslystreamsdataovertheInternettothe app.

d.Theappprobablystoresitsroutinginformationinagraphdatabase.Suchdatabasescanefficientlycalculateshortestroutes.

ANS: a.

Error! Reference source not found.

1.15Q1:Whatisthe"ultimategoal"ofthefieldofartificialintelligence?

a.Computerslearningfrommassiveamountsofdata.

b.Computervision.

c.Self-drivingcars.

d.Artificialgeneralintelligence computersthatperformintelligencetasksas wellashumans.

ANS: d.

1.15Q2:WhichofthefollowingstatementsaboutAIis false?

a.Formanydecades,AIhasbeenafieldwithsolutionsandnoproblems.

b.Google'sAlphaZeroisagame-playingAIthatteachesitselftoplaygames.

c.Ina1997matchbetweenIBM'sDeepBluecomputersystemandchess GrandmasterGaryKasparov,DeepBluebecamethefirstcomputertobeata reigningworldchesschampionundertournamentconditions.

d.Aftertraining-itselfinGoforjusteighthours,AlphaZerowasabletoplayGo

© Copyright 2016 by Pearson Education, Inc., Hoboken, NJ. All Rights Reserved.

vs.itsAlphaGopredecessor,winning60of100games.

ANS: a. Actually, for many decades, AI has been a field with problems and no solutions.

© Copyright 2016 by Pearson Education, Inc., Hoboken, NJ. All Rights Reserved.

Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.