Sie sind auf Seite 1von 2

7.3Pointersmaybeassignedtowhichofthefollowing?

(a)allintegervalues
(b)anaddress
(c)NULL
(d)both(b)and(c)
ANS:(d)
7.4.Pointersarevariablesthatcontain__________astheirvalues
a)memory
b)flowlines
c)memoryaddresses
d)directions
ANS:(c)
7.5.Anonpointervariablename__________referencesavalueandapointervariable
name__________referencesavalue.
a)directly,directly
b)directly,indirectly
c)indirectly,directly
d)indirectly,indirectly
ANS:(b)
7.6.Thedefinition
int*count;
a)isasyntaxerrorbecauseonlypointerscanbedefinedwith*notation
b)isacompiletimeerror.
c)isalogicerror.
d)isacorrectdefinitionofintegerpointercount.
ANS:(d)
7.7.Referencingavaluethroughapointeriscalled__________.
a)interdiction
b)indirection
c)intermediation
d)redirection
ANS:(b)
7.13.The__________,oraddressoperator,isaunaryoperatorthatreturnstheaddressof
itsoperand.
a)&
b)&&
c)*
d)**

ANS:(a)

7.21.Whichstatementisfalse.
a)AllfunctioncallsinCpassanyargumentscallbyvalue.
b)Simulatedcallbyreferenceenablesacalledfunctiontomodifyvariablesinthecalling
function.
c)Callbyvalueisalwaysmoreefficientthansimulatedcallbyreference.
d) In C, programmers use pointers and the indirection operator to simulate call by
reference.
ANS:(c)
7.30.Whichstatementisfalse?
a)Theconstqalifierenablestheprogrammertoinformthecompilerthatthevalueofa
particularvariableshouldnotbemodified.
b)TheconstqualifierdidnotexistinearlyversionsofC;itwasaddedtothelanguage
bytheANSICcommittee.
c)Usingtheconstqualifiertypicallyviolatestheprincipleofleastprivilege
d)AddingconsttoCprogramsthatdonotuseitpresentssignificantopportunitiesfor
improvementinthesoftwareengineeringofthatcode.
ANS:(c)
7.39.Whichstatementisfalse?
a)Thenotationsint *arrayandint array[]areinterchangeable.
b)Functionprototypesmaynotbeplacedinsidefunctions.
c)Goodadvice:Toencouragesoftwarereusability,whenpassinganarray,alsopassthe
sizeofthearray.
d)Globalvariableviolatetheprincipleofleastprivilege.
ANS:(b)

Das könnte Ihnen auch gefallen