Вы находитесь на странице: 1из 6

Whichofthefollowingstatementsistrue?

(a)hardwarecontrolssoftware
(b)softwarecommandsthecomputertoperformactionsandmakedecisions
(c)PascalandCareobjectorientedprogramminglanguages
(d)ANSIistheinternationalstandardsinstitute
Whichofthefollowingwouldnotbeconsideredhardware?
(a)anoperatingsystem
(b)aCPU
(c)akeyboard
(d)adisk
Computerprogramsare__________.
(a)setsofcontrolinstructions
(b)theinformationprocessedbythecomputer
(c)thevariousdevices(disks,memory,keyboard)thatcompriseacomputersystem
(d)thepeopleprogrammingthecomputers
Whichofthefollowingisnotoneofthesixlogicalunitsofacomputer?
(a)inputunit
(b)programmerunit
(c)memoryunit
(d)outputunit
Thecentralprocessingunit(CPU)__________.
(a)retainsinformationsothattheinformationcanbereadilyavailableforprocessing.
(b)performscalculationssuchasaddition,subtraction,multiplication,anddivision.
(c)supervisestheoperationoftheothersections.
(d)obtainsinformationfrominputdevicesandplacesitatthedisposalofotherunits.
Programsordatanotactivelybeingusedbytheotherunitsareplacedonthe
__________.
(a)outputunit.
(b)memoryunit.
(c)secondarystorageunit.
(d)centralprocessingunit.
Acomputercandirectlyunderstandonlyitsown___________.
(a)machinelanguage
(b)assemblylanguage
(c)highlevellanguage

(d)noneoftheabove
Programsthatdirectlyexecutehighlevellanguageprogramswithoutcompilingare
called__________.
(a)assemblers
(b)interpreters
(c)compilers
(d)translators

Usingstandardlibraryfunctionscanbemoreefficientbecause__________.
(a)theysaveprogrammingtime
(b)theyarecarefullywrittentoperformoptimally
(c)theyincreaseprogramportability
(d)alloftheabove.
Thecompilestageiswhen____________.
(a)theobjectcodeislinkedwithcodeforfunctionsinotherfiles
(b)theCprogramistranslatedintomachinelanguagecode
(c)theprogramisexecutedoneinstructionatatime
(d)theprogramisplacedinmemory

Thelinkercreates__________.
(a)anexecutableimage
(b)apreprocessordirective
(c)objectcode
(d)aninputstream

1. Specifying the order in which statements are to be executed in a computer


programiscalled
(a)analgorithm
(b)transferofcontrol
(c)programcontrol
(d)pseudocode
2. Whichofthefollowingencompassestheotherthree?
(a)sequencestructure
(b)repetitionstructure
(c)controlstructure
(d)selectionstructure
3. Inaflowchartofanalgorithm,whatistheshapeofthedecisionsymbol?
(a)circle
(b)rectangle
(c)diamond
(d)oval
4. Whichofthefollowingisarepetitionstructure?
(a)if
(b)ifelse
(c)dowhile
(d)switch
5. Normally,statementsinaprogramareeexecutedoneaftertheotherintheorder
inwhichtheyarewritten.Thisiscalled__________execution.
a)inline
b)seeking
c)ordered
d)sequential
6. .BohmandJacopinisworkdemonstratedthatallprogramscouldbewrittenin
terms of only three control structures, namely sequence, __________ and
repetition.
a)selection
b)serialization
c)sorting
d)searching

7. The__________flowchartsymbolisalsocalledtheactionsymbol.
a)smallcircle
b)diamond
c)oval
d)rectangle
8. Smallcirclesymbolsinaflowchartareoftencalled__________symbols.
a)littlecircle
b)collision
c)connector
d)collator
9. Thediamondflowchartingsymbolisalsocalledthe__________symbol.
a)determination
b)derision
c)declarative
d)decision
10.The__________selectionstatementperformsanactionifaconditionistrue
andskipsthatactioniftheconditionisfalse.
a)if
b)when
c)ifelse
d)switch
11.The__________selectionstatementperformsanactionifaconditionistrue
andperformsadifferentactioniftheconditionisfalse.

a)if
b)when
c)ifelse
d)switch

12.Ifgradehasthevalueof60whatwillthefollowingcodeprint?

if ( grade >= 60 )
printf(Passed);

(a)nothing
(b)60
(c)Passed
(d)printf(Passed);
13.TheCcompilerignores__________characterslikeblanks,tabsandnewlines
usedforindentationandverticalspacing.
a)transparent
b)translucent
c)white

d)whitespace
14.Whichstatementistrueaboutthecontentsofacorrectdiamondsymbolina
correctflowchart.
a)Itmustcontainaconditionthatexplicitlyevaluatestotrueorfalse
b)Itmaycontainaconditionthatcanbeeithertrueorfalse.
c)Itmustcontainrelationaloperators.
d)Itmustcontainequalityoperators.
15.Placingasemicolonaftertheparenthesizedconditioninan ifstatementleadsto
a__________errorinsingleselectionifstatementsanda__________errorin
doubleselectionifstatements.
a)logic,logic
b)logic,syntax
c)syntax,logic
d)syntax,syntax
16. Whatiswrongwiththefollowingwhileloop?

While (sum <= 1000)


sum = sum + 30;

(a)Theparenthesisshouldbebraces.
(b)Bracesarerequiredaroundsum = sum +30;.
(c)Whileshouldbewhile.
(d)ThereshouldbeasemicolonafterWhile ( sum <=1000 ).
17.Howmanytimeswillthefollowingprogramprinthello?

i = 1;
while ( i <= 10 )
printf( hello );

(a)10
(b)8
(c)aninfinitenumberoftimes
(d)0
18.ConsiderthefollowingcorrectsegmentofacorrectCprogram:

p = 2;
while ( p < 2000 )
p = 2 * p;
Whatisthevalueofpafterthiswhileloopcompletesitsexecution?

a)1023
b)1024
c)2047
d)2048
19.Anuninitializedvariablecontains________.
(a)thevaluelaststoredinthememorylocationreservedforthatvariable

(b)novalue
(c)avalueofzero
(d)arandomlyassignedvalue
20.Indefiniterepetitioniscontrolledbya
(a)counter
(b)sentinelvalue
(c)datavalue
(d)nonconstantcondition

21.Inindefiniterepetition,aninputvalue
(a)shouldalwaysbeevaluatedbeforebeingprocessed
(b)shouldalwaysbeprocesseddirectlyafteritisentered
(c)shouldneverbemodified
(d)canbeentered,processed,andevaluatedinanyorder
22.Whichofthefollowingwillnotincrementvariablecbyone?
(a)c + 1;
(b)c++;
(c)++c;
23.Inwhichofthefollowingisynotequalto5afterexecution?xisequalto4.
(a)y = 5;
(b)y = x++;
(c)y = ++x;
(d)y = x = 5;