1. 1.
You can use C
You can use C++ as a procedu++ as a procedural, as well aral, as well as an object-ors an object-oriented, languageiented, language A
A.. TTrruuee BB.. FFaallssee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 2.
2.
A default catch block catches A default catch block catches A
A.. aalll l tthhrroowwn n oobbjjeeccttss B
B.. nno o tthhrroowwn n oobbjjeeccttss C.
C. anany ty thrhrowown on objbjecect tt thahat ht has as nonot bt beeeen n cacaugught ht by by an an eaearlrlieier r cacatctch bh blolockck D.
D. alall tl thrhroown wn obobjejeccts ts ththat hat havave be beeeen cn cauaughght bt by ay an en eararlilier er cacatctch bh blolockck View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 3.
3.
Adding a derived class to
Adding a derived class to a base class requires fundamental changes to the base classa base class requires fundamental changes to the base class A
A.. TTrruuee BB.. FFaallssee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 4.
4.
Format flags may be combined using Format flags may be combined using A
A.. tthhe e bbiittwwiisse e OOR R ooppeerraattoor r ((||)) B
B.. tthhe e llooggiiccaal l OOR R ooppeerraattoor r ((||||)) C
C.. tthhe e bbiittwwiisse e AANND D ooppeerraattoor r ((&&)) D
D.. tthhe e llooggiiccaal l AANND D ooppeerraattoor r ((&&&&)) View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 5.
5.
The use of the brea
The use of the break statement in k statement in a switch sta switch statement isatement is A
A.. ooppttiioonnaall B
B.. ccoommppuullssoorryy C
C.. nnoot t a la llloowweedd. . IIt t ggiivvees s aan n eer rr roor r mmeessssaaggee D
D.. tto o cchheecck k aan n eerrrroorr E
E.. NNoonne e oof f tthhe e aabboovvee 6.
6.
To expose a data m
To expose a data member to the pember to the program, you rogram, you must declare tmust declare the data memhe data member in the _____ seber in the _____ section of the clction of the classass A
A.. ccoommmmoonn BB.. eexxppoosseedd C
C.. ppuubblliicc DD.. uunnrreessttrriicctteedd E
E.. uusseerr
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 7.
7.
Evaluate the following expression: 3
Evaluate the following expression: 3 >6&&7>4>6&&7>4 A
A.. TTrruuee BB.. FFaallssee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 8.
8.
Which of the following are valid characters for a
Which of the following are valid characters for a numeric literal constant?numeric literal constant? A A.. a a ccoommmmaa B B.. a a ddoollllaar r ssiiggn n (($$)) C C.. a a ppeerrcceennt t ssiiggn n ((%%)) D D.. a a ssppaaccee E E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 9.
9.
A function that changes the state of
A function that changes the state of the cout object is called a(n) the cout object is called a(n) _____ _____ A
A.. mmeemmbbeerr BB.. aaddjjuusstteerr C
C.. mmaanniippuullaattoorrDD.. ooppeerraattoorr View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 10.
10.
A C++ program contains a function with the header int
A C++ program contains a function with the header int function(dofunction(double d, char c). uble d, char c). Which of the following function headers could be used withinWhich of the following function headers could be used within the same program?
the same program? A
A.. cchhaar r ffuunnccttiioonn((ddoouubblle e dd, , cchhaar r cc)) B
B.. iinnt t ffuunnccttiioonn((iinnt t dd, , cchhaar r cc)) C C.. bbootth h ((aa) ) aannd d ((bb)) D D.. nneeiitthheer r ((aa) ) nnoor r ((bb)) 11. 11.
When the compiler cannot differentiate between two
When the compiler cannot differentiate between two overloaded constructorsoverloaded constructors, they , they are calledare called A
A.. oovveerrllooaaddeed Bd B.. ddeessttrruucctteedd C
C.. aammbbiigguuoouus Ds D.. dduubbiioouuss View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 12.
12.
Some Streams work with input, and some with output Some Streams work with input, and some with output A
A.. TTrruuee BB.. FFaallssee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 13.
13.
If you design a
If you design a class that needs special initialization tasks, you will want to class that needs special initialization tasks, you will want to design a(n) _____ design a(n) _____ A
A.. hhoouusseekkeeeeppiinng g rroouuttiinnee B
B.. iinniittiiaalliizzeerr C
C.. ccoonnssttrruuccttoorr D
D.. ccoommppiilleerr
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 14.
14.
Which type of statement does not occur in
Which type of statement does not occur in computer programscomputer programs?? A
A.. sseeqquueennccee BB.. lloooopp C
C.. ddeenniiaall DD.. sseelleeccttiioonn View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 15.
The newline c
The newline character is alwharacter is always included bays included betweenetween A
A.. ppaaiir r oof f ppaarreenntthheesseess B
B.. ppaaiir r oof f ccuurrlly y bbrraacceess C
C.. ccoonnttrrool l ssttrriinngg D. D. && E E.. NNoonne e oof f tthhe e aabboovvee 16. 16. To be called ob
To be called object-oriented, a progject-oriented, a programming ramming language muslanguage must allowt allow A
A.. ffuunnccttiioonns ts thhaat rt reettuurrn on onnlly a y a ssiinnggl e l e vvaal ul uee B
B.. ##iinncclluudde e ffiilleess C
C.. iinnhheerriittaannccee D
D.. AAlll l oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 17.
17.
A function that returns no values to the program that calls it is _____ A function that returns no values to the program that calls it is _____ A
A.. nnoot t aalllloowweed d iin n CC++++ B
B.. ttyyppe e vvooiidd C
C.. ttyyppe e eemmppttyy D
D.. ttyyppe e bbaarrrreenn
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 18.
18.
The keyword u
The keyword used to define a stsed to define a structure is ____ructure is _____ _ A
A.. ssttrruu BB.. sstttt C
C.. ssttrruucctt DD.. ssttrruuccttuurree View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 19.
19.
If container classes are carefully constructed, then these tools are available
If container classes are carefully constructed, then these tools are available to work with structures that are not to work with structures that are not ______ ______ A
A.. vvaalliid d wwiitthhoouut t ccoonnttaaiinneer r ccllaasssseess B
B.. pprrooggrraammmmeerr--ddeeffiinneedd C
C.. ttyyppee--ssppeecciiffiicc D
D.. ppuubblliicc
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 20.
20.
Header files often have the file
Header files often have the file extension _____ extension _____ A A.. ..HH BB.. ..HHEE C C.. ..HHEEAA DD.. ..HHEEAADD 21. 21.
The #ifndef direc
The #ifndef directive tests to see wtive tests to see whether ________ hether ________ A
A.. a a ccllaasss s hhaas s bbeeeen n ddeeffiinneedd B
B.. a a vvaarriiaabblle e hhaas s bbeeeen n ggiivveen a n a vvaalluuee C
C.. a a ccllaasss s hhaas s nno vo vaarriiaabblle e ddeeffiinniittiioonnss D.
D. anany oy obbjejectcts os of tf the he cclalasss hs haave ve bebeen en ininststanantitiatateded View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 22.
22.
Which of the following statements is false? Which of the following statements is false? A.
A. A fA fununctctioion in is a s a blblocock ok of cf codode te thahat pt pererfoformrms a s a spspececifific ic tatasksk B.
B. FuFunctnctionions als allow low proprogragrammmmers ers to bto breareak lak large rge and and cocompmplex lex proprobleblems ms intinto so smalmall anl and md manaanageageable ble tastasksks C.
C. FuFuncnctitionons als allolow pw prorogrgramammemers rs to to ususe exe exisistiting ng cocode tde to po pererfoform rm cocommmmon on tataskskss D.
D. FuFuncnctitionons cs can an be be cacalllleded, o, or ir invnvokokeded, o, onlnly oy oncnce ie in a n a prprogograramm E.
E. PrProgograrammmmerer-d-defefinined ed fufuncnctitionons s cacan n be be eieithther er vavalulue-e-reretuturnrnining g or or vovoidid View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 23.
23.
The generic type in
The generic type in a template fua template functionnction A
A.. mmuusst t bbe e TT B
B.. ccaan n bbe e TT C.
C. cacannnnot ot be be T fT for or fufuncnctitionons yos you cu crereatate, e, bubut mt may ay be be fofor Cr C++++'s b's buiuiltlt-i-in fn fununctctioionsns D
D.. ccaannnnoot t bbe e TT
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 24.
24.
When a child class function is called, the
When a child class function is called, the compiler looks first for a matching function name in the _____ compiler looks first for a matching function name in the _____ A
A.. ccllaasss os of tf thhe oe obbj ej ecct ut ussiinng tg thhe fe fuunncctti oi on nn naammee B
B.. iimmmmeeddiiaatte e aanncceessttoor r ccllaassss C
C.. bbaasse e ccllaassss D
D.. ddeesscceennddaannt t ccllaassss
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 25.
25.
A function that is called automatically each time an object
A function that is called automatically each time an object is destroyed is ais destroyed is a A
A.. ccoonnssttrruuccttoor Br B.. ddeessttrruuccttoorr C
C.. ddeessttrrooyyeerr DD.. tteerrmmiinnaattoorr 26.
26.
If you create an
If you create an instantiation of a class template with an iinstantiation of a class template with an i nt, and then create a nt, and then create a second instantiation with a double, thensecond instantiation with a double, then A.
A. yoyou mu musust pt prerececede de eaeach ch fufuncnctition on cacall ll wiwith th ththe we worord id int nt or or dodoubublele B.
B. ononce ce a fua funcnctition ion is us usesed as d as onone tye typepe, it , it bebecocomemes us unanavavaililabable fle for uor use wse witith thh the ote otheher tyr typepe C.
C. ththerere ie is ns no do dififfefererencnce in e in ththe pre prococededurure te to co calall a ml a memembeber fr fununcctitionon D
D.. yyoou cu caannnnoot pt pe re rffoorrm m tthhiis os oppeerraattiioon in in n CC++++ View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 27.
27.
The step-by-step ins
The step-by-step instructions that structions that solve a problem olve a problem are called ____are called _____ _ A
A.. aan n aallggoorriitthhmm B
B.. a a lliisstt C
C.. a a ppllaann D
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 28.
28.
The type to be used
The type to be used in an instantiation in an instantiation of a class temof a class template follows _plate follows ________ _______ A
A.. tthhe e ggeenneerriic c ccllaasss s nnaammee B
B.. tthhe e kkeeyywwoorrd d tteemmppllaattee C
C.. tthhe e kkeeyywwoorrd d ccllaassss D
D.. tthhe te teemmppllaatte de deeffiinniittiioonn
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 29.
29.
Which of the following statements allows the user to
Which of the following statements allows the user to enter data at the enter data at the keyboard?keyboard? A
A.. cciin n <<< < ccuurrrreennttPPaayy;; B
B.. cciin n >>> > ccuurrrreennttPPaayy;; C
C.. ccoouut t <<< < ccuurrrreennttPPaayy;; D
D.. ccoouut t >>> > ccuurrrreennttPPaayy;; E
E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 30.
30.
When you pass a v
When you pass a v ariable _____, C++ passes only the contents of ariable _____, C++ passes only the contents of the variable to the the variable to the receiving functionreceiving function A
A.. bby y rreeffeerreennccee B
B.. bby y vvaalluuee C
C.. gglloobbaallllyy D
D.. llooccaallllyy 31.
31.
The best form
The best form of coupling is of coupling is _____ _____ A
A.. ccoommpplleettee BB.. ttiigghhtt C
C.. lloooossee DD.. ffrreeee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 32.
32.
Paying attention to the important properties while ignoring inessential details is
Paying attention to the important properties while ignoring inessential details is known as________ known as________ A
A.. sseelleeccttiivveenneessss B..B ppoollyymmoorrpphhiissmm C
C.. aabbssttrraaccttiioon Dn D.. ssuummmmaarriizziinngg View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 33.
33.
What does C++ append to the end of a string literal constant? What does C++ append to the end of a string literal constant? A A.. a a ssppaaccee B B.. a a nnuummbbeer r ssiiggn n ((##)) C C.. aan n aasstteerriissk k ((**)) D
D.. a a nnuulll l cchhaarraacctteerr
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 34.
34.
An array name is a _____ An array name is a _____ A
A.. ssuubbssccrriipptt B
B.. ffoorrmmaal l ppaarraammeetteerr C
C.. mmeemmoorry y aaddddrreessss D
D.. pprroottoottyyppee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 35.
35.
To enter a com
To enter a comment in a proment in a program, you beggram, you begin the commin the comment with _____ ent with _____ A
A.. **** BB.. &&&& C C.. \\\\ DD.. @@ E E.. //// 36. 36.
Which of the following is(are) invalid string constant(s)? Which of the following is(are) invalid string constant(s)? A
A.. ''77..115 5 ppmm'' B
B.. ""i i lliikke e ee"" C C.. ""77..33eell22"" D D.. ""11223344eell22"" E E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 37.
37.
You define a struc
You define a structure type globally becture type globally because _____ ause _____ A.
A. you you savsave me many any linlines oes of cof code bde by noy not rewt rewritriting ing an ian idendentictical sal strutructucture dre defiefinitnition ion in ein each ach funfunctiction ton that hat useuses its it B
B.. yyoou wu wiilll nl neevveer cr chhaanngge ie itts ds deeffiinniittiioonn C
C.. iit t iis s rreeqquuiirreed d iin n CC++++ D
D.. AAlll l oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 38.
38.
Overloaded functions are required to Overloaded functions are required to A
A.. hhaavve e tthhe e ssaamme e rreettuurrn n ttyyppee B
B.. hhaavve e tthhe e ssaamme e nnuummbbeer r oof f ppaarraammeetteerrss C
C.. ppeerrffoorrm m tthhe e ssaamme e bbaassiic c ffuunnccttiioonnss D
D.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 39.
39.
Redirection redirects Redirection redirects A
A.. a a ssttrreeaam m ffrroom m a a ffiille e tto o tthhe e ssccrreeeenn B
B.. a a ffiille e ffrroom m a a ddeevviicce e tto o a a ssttrreeaamm C
C.. a a ddeevviicce e ffrroom m tthhe e ssccrreeeen n tto o a a ffiillee D
D.. tthhe e ssccrreeeen n ffrroom m a a ddeevviicce e tto o a a ssttrreeaamm View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 40.
40. You mark th
A. A. // B. B. ** C. C. {{ D. D. }} E
E.. eeiitthheer r ((cc) ) oor r ((dd) ) ccaan n bbe e uusseedd 41.
41.
Sending a copy of data
Sending a copy of data to a program module is called _______ to a program module is called _______ A
A.. ppaassssiinng g a a vvaalluuee B
B.. mmaakkiinng g a a rreeffeerreennccee C
C.. rreeccuurrssiioonn D
D.. sseettttiinng g a a ccoonnddiittiioonn
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 42.
42.
Of the three ways to
Of the three ways to pass arguments to functions, only passing by _____ and passing by pass arguments to functions, only passing by _____ and passing by _____ allow the function to modify the argument in the_____ allow the function to modify the argument in the calling program
calling program A
A.. rreeffeerreennccee, , ppooiinntteerr B
B.. aarrrraayy, , llooccaattiioonn C
C.. ppooiinntteerr, , rreeffeerreennccee D
D.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 43.
43.
To use either an inpu
To use either an input or output file, tt or output file, the program mhe program must include the __ust include the _____ header file___ header file A
A.. ffiilleessttrreeaamm..hhBB.. ffssttrreeaamm..hh C
C.. iinnssttrreeaamm..hh DD.. iinnoouuttssttrreeaamm..hh E
E.. iioossttrreeaamm..hh
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 44.
44.
A widget is to the blueprint for a widget as an object is to A widget is to the blueprint for a widget as an object is to A
A.. a a mmeemmbbeer r ffuunnccttiioonn B
B.. a a ccllaassss C
C.. aan n ooppeerraattoorr D
D.. a a ddaatta a iitteemm
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 45.
45.
C++ allows you to define the same functions more than once in the same program _____ C++ allows you to define the same functions more than once in the same program _____ A
A.. iif f tthhe e ddeeffiinniittiioonns s aarre e iiddeennttiiccaall B.
B. if if ththe de defefininititioions ns arare ie incncluludeded id in tn twwo so sepepararatate #e #ininclcludude fe filileses C.
C. if tif the dhe defefininititioions ans are lre lococatated ied in a sn a sininglgle #ie #incnclulude fde file ile ththat iat is ins inclclududed med morore the than oan oncncee D.
D. C+C++ do+ does nes not aot allollow yow you to du to defefinine the the sae same fme fununctctioions mns morore the than oan oncnce in te in the she samame pre progograramama 46.
46.
Which of the following assigns the number 5 to
Which of the following assigns the number 5 to the area variable?the area variable? A A.. aarreea a 1 1 = = 55 B B.. aarreea a = = 55 C C.. aarreea a === = 55 D D.. aarreea a ----> > 55 E E.. aarreea a < < > > 55
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 47.
47.
A base class may also be called a A base class may also be called a A
A.. cchhiilld d ccllaassss B
B.. ssuubbccllaassss C
C.. ddeerriivveed d ccllaassss D
D.. ppaarreennt t ccllaassss
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 48.
48.
The _____ mode
The _____ mode tells C++ to opetells C++ to open a file for inputn a file for input A
A.. aadddd::::iiooss BB.. iinn::::ffiillee C
C.. iiooss::::aapppp DD.. iiooss::::iinn E
E.. iiooss::::oouutt
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 49.
49.
Using the wardrobe structure within the ShopList structure is an e
Using the wardrobe structure within the ShopList structure is an e xample of a good programming principle, known as _____ xample of a good programming principle, known as _____ A
A.. rreeuussaabbiilliittyy BB.. ppoollyymmoorrpphhiissmm C
C.. rreedduunnddaannccyy DD.. rreeccuurrssiioonn
Section-II Section-II
1. 1.
When you omit parameters from a function call, values can be
When you omit parameters from a function call, values can be provided byprovided by A
A.. ffoorrmmaal l ppaarraammeetteerrss B
B.. rreeffeerreenncce pe paarraammeetteerrss C
C.. oovveerrllooaaddeed d ppaarraammeetteerrss D
D.. ddeeffaauullt t ppaarraammeetteerrss
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 2.
2.
The first element
The first element in a string isin a string is A
A.. tthhe e nnaamme e oof f tthhe e ssttrriinngg B
B.. tthhe e ffiirrsst t cchhaarraacctteer r iin n tthhe e ssttrriinngg C
C.. tthhe e lleennggtth h oof f tthhe e ssttrriinngg D
D.. tthhe e nnaamme e oof f tthhe e aarrrraay y hhoollddiinng g tthhe e ssttr ir inngg View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 3.
Variables declared outside a block are called _____ Variables declared outside a block are called _____ A
A.. gglloobbaall BB.. uunniivveerrssaall C
C.. sstteellllaarr DD.. eexxtteerrnnaall View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 4.
4.
The compiler c
The compiler converts your C+onverts your C++ instructions into + instructions into _____ _____ A
A.. eeddiitteed d ccooddee B
B.. oobbjjeecct t ccooddee C
C.. ssoouurrcce e ccooddee D
D.. ttrraannssllaatteed d ccooddee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 5.
5.
A fundamental type such as int or double is a _____ A fundamental type such as int or double is a _____ A
A.. pprrooggrraammmmeerr--ddeeffiinneed d ttyyppee B
B.. ccoommpplleex x ttyyppee C
C.. nnoonnssccaallaar r ttyyppee D
D.. ssccaallaar r ttyyppee 6.
6.
The return type you
The return type you code for all ccode for all constructors is onstructors is _____ _____ A
A.. vvooiidd B
B.. tthhe e ccllaasss s ttyyppee C.
C. ththe se samame e tytype pe as as ththe fe firirst st dadata ta mmemembeber dr defefinined ed in in ththe ce clalassss D
D.. nno o ttyyppee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 7.
7.
When an object-oriented program detects an error within a function, the function _________ When an object-oriented program detects an error within a function, the function _________ A
A.. tthhrroowws s aan n eexxcceeppttiioonn B
B.. tthhrroowws s a a ffiitt C
C.. ccaattcchhees s a a mmeessssaaggee D
D.. ccaattcchhees s aan n eexxcceeppttiioonn
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 8.
8.
Using a statement at the
Using a statement at the wrong time or with an inappropriate object creates awrong time or with an inappropriate object creates a A
A.. llooggiiccaal l eerrrroorr B
B.. ssyynnttaax x eerrrroorr C
C.. ccoommppiilleer r eerrrroorr D
D.. llaanngguuaagge e eerrrroorr
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 9.
9.
When you create a derived
When you create a derived class and instantiate an object _____ class and instantiate an object _____ A.
A. ththe pe parareent nt cclalasss os objbjecect mt musust bt be ce cononststrrucucteted fd firirsstt B.
B. ththe ce chihilld cd clalass ss oobbjeject ct mmusust bt be ce coonsnstrtrucucteted fd firirsstt C.
C. ththe pe parareent nt cclalasss os objbjecect mt musust nt noot bt be ce coonsnstrtrucuctetedd D.
D. ththe ce chihilld cd clalass ss oobbjeject ct mmusust nt not ot bbe ce coonsnstrtrucuctetedd View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 10.
10.
Evaluate the following expression: 4 >6 || 10 < 2 * 6 Evaluate the following expression: 4 >6 || 10 < 2 * 6 A
A.. TTrruuee BB.. FFaallssee 11.
11.
A constructor always has A constructor always has A
A.. ccoommmmuunniiccaattiioonnaal cl coohheessiioonn B
B.. tteemmppoorraal l ccoohheessiioonn C
C.. llooggiiccaal l ccoohheessiioonn D
D.. nno o ccoohheessiioonn
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 12.
12.
A normal C++ operator that acts in
A normal C++ operator that acts in special ways on newly defined data types is special ways on newly defined data types is said to besaid to be A
A.. gglloorriiffiieedd BB.. eennccaappssuullaatteedd C
C.. ccllaassssiiffiieedd DD.. oovveerrllooaaddeedd View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 13.
13.
A function in a derived class that has the same name as a function in the parent class A function in a derived class that has the same name as a function in the parent class A
A.. wwiilll l oov ev er rr riidde e tthhe e bbaasse e ccl al asss s ffuunnccttiioonn B
B.. wwiilll l ccaauusse e aan n eer rr roor r mmeessssa ga ge e tto o ddi si sppllaayy C.
C. wwilill l be be ovovererriridddden en bby y ththe e bbasase e clclasass s ffununccttioionn D.
D. wiwill ll exexececutute e imimmemedidiatatelely y ofofteten n ththe e babase se clclasass s fufuncnctition on exexececututeses View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 14.
14.
In which statements, does a 'continue' statements cause the control to go
In which statements, does a 'continue' statements cause the control to go directly to the test directly to the test condition and then continue the looping process?condition and then continue the looping process? A
A.. ''ffoorr' ' aannd d ''wwhhiillee'' B
B.. ''wwhhiillee' ' aannd d ''iiff--eellssee'' C
C.. ''ddoo--wwhhiillee' ' aannd d ''iiff--eellssee'' D
D.. ''wwhhiillee' ' aannd d ''ddoo--wwhhiillee'' E
E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 15.
15.
Which of the following statements is false? Which of the following statements is false? A.
A. YoYou tyu typipicacalllly usy use a pue a publblic mic memembeber fur funcnctition ton to cho chanange tge the vhe valalue iue in a prn a privivatate dae data mta memembeberr B.
B. BeBecaucause tse the che consonstrutructctor fuor functnction ion doedoes nos not rett return a urn a valvalue, ue, you pyou placlace the the kee keywoyword vord void beid befofore thre the coe constnstrucructotor's nr's namamee C.
C. The The pubpublic lic memembmber fer funcunctiotions ins in a cn a claslass cas can be n be accaccessessed bed by any any pry progrogram am thathat ust uses aes an obn objecject crt createated fed from rom thathat clt classass D.
D. AAn n ininststanancce e of of a a cclalasss is is s coconsnsididerered ed an an obobjejecctt 16.
In a class specifier, data or
In a class specifier, data or functions designated private are accessiblefunctions designated private are accessible A
A.. tto o aanny y ffuunnccttiioon n iin n tthhe e pprrooggrraamm B
B.. oonnlly y iif f yyoou u kknnoow w tthhe e ppaasssswwoorrdd C
C.. tto o mmeemmbbeer r ffuunnccttiioonns s oof f tthhaat t ccllaassss D
D.. oonnlly y tto po puubblliic c mmeemmbbeerrs s oof f tthhe ce cllaassss View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 17.
17.
When a function includes a throw statement for errors, the
When a function includes a throw statement for errors, the call to the potentially offending function should be placed within a call to the potentially offending function should be placed within a _____ block_____ block A
A.. tthhrrooww BB.. ttrryy C
C.. ccaattcchh DD.. ssccooppee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 18.
18.
The scope resolut
The scope resolution operator ision operator is A
A.. a a ccoommmmaa B
B.. a a sseemmiiccoolloonn C
C.. a a ccoolloonn D
D.. ttwwo o ccoolloonnss
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 19.
19.
"C++" is a _____ constant "C++" is a _____ constant A
A.. cchhaarraacctteer r lliitteerraall B
B.. nnaammeed d lliitteerraall C
C.. nnuummeerriic c lliitteerraall D
D.. ssttrriinng g lliitteerraall
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 20.
20.
In a C++ program, which of the following can be thrown? In a C++ program, which of the following can be thrown? A
A.. ssccaallaar r vvaarriiaabblleess B
B.. pprrooggrraammmmeerr--ddeeffiinneed d oobbjjeeccttss C C.. bbootth h ((aa) ) aannd d ((bb)) D D.. nneeiitthheer r ((aa) ) nnoor r ((bb)) 21. 21.
The items listed in
The items listed in the function hethe function header are called ader are called _____ _____ A
A.. aaccttuuaal l aarrgguummeennttss B
B.. ffoorrmmaal l ppaarraammeetteerrss C
C.. ppaasssseed d ppaarraammeetteerrss D
D.. sseennt t aarrgguummeennttss
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 22.
22.
A translator that notes whether you
A translator that notes whether you have used a language correctly may be called a have used a language correctly may be called a _____ _____ A
A.. tthheeaassuurruuss BB.. ccoommppiilleerr C
C.. ccooddeerr DD.. ddeeccooddeerr View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 23.
23.
The feature in o
The feature in object-oriented prograbject-oriented programming thamming that allows the samt allows the same operation to be ce operation to be carried out differentarried out differently, depending oly, depending on the object, is___n the object, is_____ __ A
A.. iinnhheerriittaanncce Be B.. ppoollyymmoorrpphhiissmm C
C.. oovveerrffuunnccttiioonniinngg DD.. oovveerrrriiddiinngg View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 24.
24.
When an argument is passed by r
When an argument is passed by r eference,eference, A.
A. a va varariaiablble ie is cs crereatated ed in in ththe fe fununctctioion to n to hohold ld ththe are argugummenent't's vs valalueue B.
B. ththe fe fununctctioion cn caannnnot ot acacccesess ts the he aargrgumumenentt's 's vavaluluee C.
C. a tea tempmpororarary vay variariablble is e is crcreaeateted in d in ththe cae callllining pg prorogrgram am to hto holold thd the are argugumementnt's v's valalueue D.
D. ththe fe fununctctioion acn accecesssses es ththe are argugumementnt's 's ororigigininal al vavalulue ie in tn the he cacallllining pg prorogrgramam E
E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 25.
25.
The process of
The process of extracting the relevaextracting the relevant attributes of an nt attributes of an object is knowobject is known asn as A
A.. ppoollyymmoorrpphhiissmm B
B.. iinnhheerriittaannccee C
C.. aabbssttrraaccttiioonn D
D.. ddaatta a hhiiddiinngg 26.
26.
Which of the following statements uses the computer's clock to initialize the random number generator? Which of the following statements uses the computer's clock to initialize the random number generator? A
A.. ssrraanndd((ttiimmee));; B..B ssrraanndd((ttiimmee((NNUULLLL))));; C
C.. ttiimmee((ssrraanndd));; D..D ttiimmee((ssrraanndd((NNUULLLL))));; View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 27.
27.
A static data member is given a value A static data member is given a value A
A.. wwiitthhiin n tthhe e ccllaasss s ddeeffiinniittiioonn B
B.. oouuttssiidde e tthhe e ccllaasss s ddeeffiinniittiioonn C
C.. wwhheen n tthhe e pprrooggrraam m iis s eexxeeccuutteedd D
D.. nneevveerr
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 28.
28.
You must provide
You must provide a constructoa constructor for a derived cr for a derived classlass A
A.. aallwwaayyss B.
B. if if tthe he babase se cclalasss cs coonsnsttrurucctotor rr reeququirireed ad argrgumumenenttss C.
C. if if ththe be basase ce clalass ss coconsnstrtrucuctotor dr doeoes ns not ot rereququirired ed arargugumementntss D
D.. nneevveerr
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum
29. 29.
If you want to
If you want to override constructor default values for an object you are ioverride constructor default values for an object you are i nstantiating, you must also overridenstantiating, you must also override A
A.. aalll ol otthheer pr paarraamme te teerrs ts to to thhaat ct coonnssttrruuccttoorr B
B.. aalll l ppaarraamme te teerrs s tto o tthhe e lleefft t oof f tthhaat t vvaal ul uee C
C.. aalll l ppaarraamme te teerrs s tto to thhe re riigghht t oof f tthhaat vt vaalluuee D
D.. nno oo otthhe r e r ppaarraammeetteerrs s tto to thhaat ct coonnssttr ur uccttoorr View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 30.
30.
To use one of th
To use one of the C++ built-in me C++ built-in mathematical athematical functions, yofunctions, you must includu must include the _____ header fe the _____ header file in your programile in your program A
A.. ccaallccuullaattiioonn..hh BB.. ccoommppuuttee..hh C
C.. eexxpprreessssiioonn..hh DD.. mmaatthh..hh E
E.. mmaatthheemmaattiiccaall..hh 31.
31.
Errors in a program are called Errors in a program are called A
A.. aacccciiddeennttss B
B.. aannnnooyyaanncceess C
C.. bbuuggss D
D.. mmiissttaakkeess E
E.. ttyyppiinng g eerrrroorrss
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 32.
32.
If you declare two objects as
If you declare two objects as Customer firstCust, secoCustomer firstCust, secondCust; which of the following must be true?ndCust; which of the following must be true? A.
A. EaEach ch obobjejectct's 's nononsnstatatitic dc datata ma memembebers wrs will ill be sbe stotorered in d in ththe sae same me mememomory lry lococatatioionn B.
B. EaEach ch obobjeject ct wwilill l be be ststorored ed in in ththe e sasamme e mmememorory y lolocacatitionon C.
C. EaEach ch oobjbjecect wt wilill l hahave ve a ua uniniquque e mmeemmoory ry adadddreressss D.
D. YYou ou ccanannnot ot ddececlalare re twtwo oo objbjecects ts of of tthe he sasamme ce clalassss View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 33.
33.
Which of the following is the
Which of the following is the inequality operator?inequality operator? A A.. !!== BB.. == C C.. ==== DD.. ---->> E E.. <<>>
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 34.
34. If a derived
If a derived class uses the public access specifier, then _____ class uses the public access specifier, then _____ A.
A. pupublblic ic babase se clclasass ms memembebers rs reremmaiain pn pubublilic ic in tn the he dedeririveved cd clalassss B.
B. prprototececteted bd basase ce clalass ss mmemembebers rs bebeccomome pue publblic ic in in ththe de dererivived ed clclasasss C
C.. bbootth h ((aa) ) aannd d ((bb)) D
D.. nneeiitthheer r ((aa) ) nnoor r ((bb))
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 35.
35.
The operator that releas
The operator that releases previously alloces previously allocated memoated memory is _____ ry is _____ A
A.. rreelleeaassee BB.. rreettuurrnn C
C.. ddeelleettee DD.. ddeessttrrooyy 36.
36.
When a language has the capability to produce new data types, it is said to be When a language has the capability to produce new data types, it is said to be A
A.. rreepprreehheennssiibbllee BB.. eennccaappssuullaatteedd C
C.. oovveerrllooaaddeed Dd D.. eexxtteennssiibbllee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 37.
37.
A compound statement does not consist of A compound statement does not consist of A
A.. a a ssiinngglle e ssttaatteemmeenntt B
B.. ootthheer r ccoommppoouunnd d ssttaatteemmeennttss C
C.. eexxpprreessssiioon n ssttaatteemmeennttss D
D.. ccoonnttrrool l ssttaatteemmeennttss E
E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 38.
38.
Which of the following statements will display the word "Hello" on the
Which of the following statements will display the word "Hello" on the computer screen?computer screen? A
A.. cciin n <<< < ""HHeelllloo"";; B
B.. cciin n >>> > ""HHeelllloo"";; C
C.. ccoouut t <<< < ""HHeelllloo"";; D
D.. ccoouut t >>> > ""HHeelllloo"";; E
E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 39.
39.
The preprocessor
The preprocessor directive alwadirective always starts with the ys starts with the symbolsymbol A. A. %% B. B. && C. C. ## D D.. """" E E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 40.
40.
Which of the following statements is true? Which of the following statements is true? A.
A. DaData ta cocoupupliling ng is is titighghteter r ththan an papaththolologogicical al cocoupuplilingng B.
B. CCoommmmon on ccoouuplplining g is is lolooosser er ththan an dadata ta cocoupuplilingng C.
C. DaDatata-s-strtrucuctuturered cd cououplplining ig is ls looososer er ththan an cocontntrorol cl cououplpliningg D.
D. CCoontntrorol cl cououplplining g is is llooooseser tr thahan dn daata ta ccooupuplilingng 41.
41.
Evaluate the following expression: 7 >=3 +
A
A.. TTrruuee BB.. FFaallssee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 42.
42.
The base class f
The base class for most stream or most stream classes is the classes is the _____ class_____ class A
A.. iiooss BB.. oouutt C
C.. iinn DD.. aapppp
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 43.
43.
Which of the following while clause will stop the loop when the value in the age variable is less than the number 0? Which of the following while clause will stop the loop when the value in the age variable is less than the number 0? A A.. wwhhiille e aagge e < < 00 B B.. wwhhiille e ((aagge e < < 00)) C C.. wwhhiille e aagge e >>= = 00;; D D.. wwhhiille e ((aagge e >>= = 00));; E
E.. wwhhiille e ((aagge e >>= = 00))
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 44.
44.
The most effi
The most efficient data type focient data type for a variable that stor a variable that stores the number res the number 4.6e20 is the ___4.6e20 is the _____ data type__ data type A
A.. CChhaarraacctteerr B
B.. DDoouubbllee C
C.. FFllooaatt D
D.. LLoonng g IInntteeggeerr E
E.. SShhoorrt t IInntteeggeerr
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 45.
45.
Which of the following is a
Which of the following is a C++ object?C++ object? A
A.. cciinn BB.. >>>> C
C.. iioossttrreeaamm DD.. rreeaadd(()) 46.
46.
Which of the following can be used to
Which of the following can be used to declare the main function?declare the main function? A
A.. vvooiid d mmaaiinn B
B.. vvooiid d MMaaiinn(()) C
C.. vvooiid d mmaaiinn(()) D
D.. mmaaiinn E
E.. eeiitthheer r ((bb) ) oor r ((cc) ) ccaan n bbe e uusseedd View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 47.
47.
You _____ write
You _____ write your own coyour own container classesntainer classes A A.. mmuusstt B B.. mmaayy C C.. sshhoouulld d nnoott D D.. mmuusst t nnoott
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 48.
48.
If an integer object
If an integer object is thrown with a throw statement, then a is thrown with a throw statement, then a subsequent catch block has a usable match if the type subsequent catch block has a usable match if the type of the catch argument isof the catch argument is A A.. iinntt B B.. ddoouubbllee C C.. eeiitthheer r ((aa) ) oor r ((bb)) D D.. nneeiitthheer r ((aa) ) nnoor r ((bb))
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 49.
49.
The highest level o
The highest level of cohesion isf cohesion is A
A.. ffuunnccttiioonnaal l ccoohheessiioonn B
B.. tteemmppoorraal l ccoohheessiioonn C
C.. llooggiiccaal l ccoohheessiioonn D
D.. sseeqquueennttiiaal l ccoohheessiioonn
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 50.
50.
You separate a derive
You separate a derived class namd class name from its ace from its access speccess specifier withifier with A
A.. a a ccoolloonn B
B.. ttwwo o ccoolloonnss C
C.. aat t lleeaasst t oonne e ssppaaccee D
D.. a a sseemmiiccoolloonn Section-III
Section-III
1. 1.
The last statemen
The last statement in a function t in a function is often a(n) __is often a(n) _____ ___ A
A.. rreettuurrnn BB.. ggooooddbbyyee C
C.. ffiinniisshh DD.. eennddffuunnccttiioonn View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 2.
2.
When the function int someFunction(char c) throw( ) is executed, _____ When the function int someFunction(char c) throw( ) is executed, _____ A
A.. iit t ccaan n tthhrroow w aannyytthhiinngg B
B.. iit t mmaay y tthhrroow w aan n iinntteeggeerr C
C.. iit t mmaay y tthhrroow w a a cchhaarraacctteerr D
D.. iit t mmaay y nnoot t tthhrroow w aannyytthhiinngg
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 3.
3.
The two statem
The two statements that can bents that can be used to change e used to change the flow of cthe flow of control areontrol are A
B
B.. iif f aannd d wwhhiillee C
C.. sswwiittcch h aannd d ddoo--wwhhiillee D
D.. bbrreeaak k aannd d ccoonnttiinnuuee E
E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 4.
4.
If p and q are assigned the values 2
If p and q are assigned the values 2 and 3 respectively then the statement P = q++and 3 respectively then the statement P = q++ A
A.. ggiivvees s aan n eerrrroor r mmeessssaaggee B
B.. aassssiiggnns s a a vvaalluue e 4 4 tto o pp C
C.. aassssiiggnns s a a vvaalluue e 3 3 tto o pp D
D.. aassssiiggnns s a a vvaalluue e 5 5 tto o pp E
E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 5.
5.
Which of the following is the
Which of the following is the insertion operator?insertion operator? A A.. >>>> B B.. <<<< C C.. //// D D.. //** E
E.. bbootth h ((aa) ) aannd d ((bb)) 6.
6.
If you want only
If you want only one memory location to be reserved for a one memory location to be reserved for a class variable, no matter how many objects are instantiated, you should declare theclass variable, no matter how many objects are instantiated, you should declare the variable as
variable as A
A.. ssttaattiicc BB.. uunnaarryy C
C.. ddyynnaammiicc DD.. vvoollaattiillee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 7.
7.
To use a template
To use a template class memclass member function, uber function, use the ________ wse the ________ with the instantiationith the instantiation A
A.. ssccooppe e rreessoolluuttiioon n ooppeerraattoorr B
B.. ddoot t ooppeerraattoorr C
C.. ccllaasss s ddeeffiinniittiioonn D
D.. kkeewwoorrd d tteemmppllaattee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 8.
8.
When a class is derived
When a class is derived from another derived class, the newly derived classfrom another derived class, the newly derived class A.
A. mamay hay have ve momore lre libibereral aal accccesess ts to a bo a basase ce clalass ss memembmber ter thahan itn its ims immemedidiatate pe prerededececessssoror B.
B. mamay hay have ve ththe sae same me tytype pe of aof accccesess to s to a baa base cse clalass mss memembeber as r as itits ims immemedidiatate pre prededececesessosorr C.
C. mamay hay have mve morore lie limimiteted acd accecess tss to a bao a base cse clalass mss memembeber thr than ian its its immmmedediaiate pte prerededececessssoror D
D.. bbootth h ((bb) ) aannd d ((cc))
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 9.
9.
If you assign a
If you assign a default value to any vdefault value to any v ariable in a function prototype's parameter list, then _____ ariable in a function prototype's parameter list, then _____ A.
A. alall ol othther er papararamemeteters rs in in ththe fe fununctctioion pn prorotototytype pe mumust st hahave ve dedefafaulult vt valalueuess B.
B. alall pl pararamameteterers s to to ththe re rigight ht of of ththat at vavaririabable le mumust st hahave ve dedefafaulult vt valualueses C.
C. alall pl pararamameteterers ts to tho the lee left ft of of ththat vat varariaiablble me musust ht havave de defefauault lt vavalulueses D.
D. no no ototheher pr pararamameteterers is in tn thahat pt prorotototytype pe cacan hn havave de defefauault lt vavalulueses View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 10.
10.
The dot operator (or
The dot operator (or class memclass member access ber access operator) conneoperator) connects the followcts the following two entities ing two entities (reading from (reading from left to right):left to right): A
A.. a a ccllaasss s mmeemmbbeer r aannd d a a ccllaasss s oobbjjeecctt B
B.. a a ccllaasss s oobbjjeecct t aannd d a a ccllaassss C
C.. a a ccllaasss s aannd d a a mmeemmbbeer r oof f tthhaat t ccllaassss D
D.. a a ccllaasss s oobbjjeecct at annd d a a mmeemmbbeer or of f tthhaat ct cllaassss 11.
11.
Which of the following calls a function named displayName, passing it no actual arguments? Which of the following calls a function named displayName, passing it no actual arguments? A
A.. ccaalll l ddiissppllaayyNNaammee;; B
B.. ccaalll l ddiissppllaayyNNaamme e (());; C
C.. ddiissppllaayyNNaammee;; D
D.. ddiissppllaayyNNaammee(());;
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 12.
12.
The feature that allow
The feature that allows you to use ts you to use the same funche same function name fotion name for separate funcr separate functions that have diftions that have different argumferent argument lists is called _ent lists is called _____ ____ A
A.. oovveerrrriiddiinngg BB.. oovveerrllooaaddiinngg C
C.. ccoonnssttrruuccttiinngg DD.. ddeessttrruuccttiinngg View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 13.
13.
Which of the
Which of the following are valid characters constants?following are valid characters constants? A A.. ''\\nn'' B B.. ''\\\\'' C C.. ''\\00'' D D.. AAlll l oof f tthhe e aabboovvee E E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 14.
14.
With a template class, _____ type is generic With a template class, _____ type is generic A A.. nnoo B B.. eexxaaccttlly y oonnee C C.. aat t lleeaasst t oonnee D D.. aat t mmoosst t oonnee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 15.
15.
If you want to use a class to define objects in many different programs, you should define the class in a C++ _____ file If you want to use a class to define objects in many different programs, you should define the class in a C++ _____ file A
C
C.. ssoouurrccee DD.. tteexxtt 16.
16.
Functions that returns information about an object's state can be classified as Functions that returns information about an object's state can be classified as ________ ________ A
A.. iinnssppeeccttoor r ffuunnccttiioonnss B
B.. mmuuttaattoor r ffuunnccttiioonnss C
C.. aauuxxiilliiaarry y ffuunnccttiioonnss D
D.. mmaannaaggeer r ffuunnccttiioonnss
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 17.
17.
An auxiliary function _____ An auxiliary function _____ A
A.. rreettuurrn n iinnffoorrmma ta tiioon n aabboouut t ddaatta a mmeemmbbeerrss B
B.. cchhaannggees s tthhe e ssttaatte e oof f ddaatta a mmeemmbbeerrss C
C.. ppeerrffoorrmms s aan n aaccttiioon n oor r sseerrvviiccee D
D.. ccrreeaattees s aannd d ddeessttrrooyys s oobbjjeeccttss View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 18.
18.
To create and exec
To create and execute a C++ progrute a C++ program, you need am, you need to have accesto have access tos to A
A.. a a CC+++ + ccoommppiilleerr B
B.. a a CC+++ + ttrraannssllaattoorr C
C.. aan n oobbjjeecct t ccoodde e eeddiittoorr D
D.. a a tteexxt t eeddiittoorr E
E.. bbootth h ((aa) ) aannd d ((dd))
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 19.
19.
If you omit any
If you omit any constructoconstructor argument when you instantiate an object, r argument when you instantiate an object, you must use default values______ you must use default values______ A
A.. ffoor r aal l l l ppaarraammeetteer s r s tto o tthhe e ccoonnssttrruuccttoorr B.
B. ffor or alall l papararammeteteers rs to to ththe e ririghght t oof f ththe ae argrguummenentt C.
C. ffor or alall l papararammeteteers rs to to ththe e lelefft t oof f ththe ae argrguummenentt D
D.. ffoor r nno o ootthheer r ppaarraammeetteerrss
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 20.
20.
Many programmers separate a class into two files: _____ Many programmers separate a class into two files: _____ A.
A. onone fe for or ththe de dececlalararatitionons as and nd onone fe for or ththe ie impmplelemmenentatatitiononss B.
B. onone fe for or ththe ve voioid fd fununcctitionons as and nd onone fe foor tr the he ototheher fr fununctctioionsns C.
C. oone ne fofor tr thhe pe puublblic ic ddatata aa and nd onone fe foor tr the he prprivivatate de datataa D.
D. onone foe for thr the pre primimarary fuy funcnctitionons ans and od one fne foor thr the aue auxixililiarary fy fununctctioionsns 21.
21.
Files whose names end in .h
Files whose names end in .h are called _____ filesare called _____ files A
A.. hhaannddyy BB.. hheeaaddeerr C
C.. hheellppeerr DD.. hheellppiinngg View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 22.
22.
When accessing a structure member, the identifier to the left
When accessing a structure member, the identifier to the left of the dot operator is of the dot operator is the name of the name of A
A.. a a ssttrruuccttuurre e mmeemmbbeerr B
B.. a a ssttrruuccttuurre e ttaagg C
C.. a a ssttrruuccttuurre e vvaarriiaabbllee D
D.. tthhe e kkeeyywwoorrd d ssttrruucctt
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 23.
23.
Assume that a program contains a programmer-define
Assume that a program contains a programmer-defined void function. When C++ encounters the function's closing brace (}), C++ returns to d void function. When C++ encounters the function's closing brace (}), C++ returns to thethe statement _____
statement _____ A.
A. imimmemedidiatatelely ay abobove ve ththe se statatetemement nt ththat at cacalllled ed ththe fe fununctctioionn B
B.. tthhaat t ccaalllleed d tthhe e ffuunnccttiioonn C.
C. imimmemedidiatatelely by belelow ow ththe se statatetemmenent tt thahat ct calalleled td the he fufuncnctitionon View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 24.
24.
Inheritance occurs when a class adopts all the traits
Inheritance occurs when a class adopts all the traits of _________ of _________ A
A.. aan n oobbjjeecctt B
B.. a a ppaarreennt t ccllaassss C
C.. a a vvaarriiaabbllee D
D.. a a ffuunnccttiioonn
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 25.
25.
Template classe
Template classes that have alreads that have already been written to py been written to perform coerform common clasmmon class tasks are cs tasks are called _____ alled _____ A
A.. ccoonnttaaiinneer r ccllaasssseess B
B.. rreecceeppttaacclle e ccllaasssseess C
C.. rreeppoossiittoorry y ccllaasssseess D
D.. aalleemmbbiic c ccllaasssseess 26.
26.
A _____ is a single item of information about a person, place, or thing A _____ is a single item of information about a person, place, or thing A
A.. ddaatta a ffiillee B
B.. ffiieelldd C
C.. pprrooggrraam m ffiillee D
D.. rreeccoorrdd
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 27.
27.
Which (if any) of the
Which (if any) of the following is NOT a programmer-defined typefollowing is NOT a programmer-defined type A
A.. aan n aarrrraayy B
B.. a a ssttrruuccttuurree C
D.
D. AAll ll oof tf thhe ae abbovove e arare pe prorogrgramammmerer-d-defefinined ed ttypypeses View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 28.
28.
Assume a program contains a
Assume a program contains a void function named displayName, which requires no formal parameters. Which of void function named displayName, which requires no formal parameters. Which of the following is the following is a correcta correct function prototype for this
function prototype for this function?function? A
A.. ddiissppllaayyNNaammee;; B
B.. ddiissppllaayyNNaammee((vvooiidd));; C
C.. vvooiid d ddiissppllaayyNNaammee;; D
D.. vvooiid d ddiissppllaayyNNaammee(());; E
E.. vvooiid d ddiissppllaayyNNaammee((nnoonnee));;
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 29.
29.
A file pointer always contains the address of A file pointer always contains the address of the filethe file A
A.. TTrruuee BB.. FFaallssee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 30.
30.
You declare a f
You declare a function with unction with a function __a function _____, which is t___, which is typically entered at ypically entered at the beginning of the beginning of the program, bethe program, below the #inclulow the #include directivesde directives A
A.. ccaallll BB.. ddeeccllaarraattiioonn C
C.. ddeeffiinniittiioonn DD.. pprroottoottyyppee 31.
31.
The function w
The function whose prototype ihose prototype is Item getData(vos Item getData(void); returns ___id); returns _____ __ A
A.. tthhe e aaddddrreesss s oof f a a ssttrruuccttuurree B
B.. a a ccooppy y oof f a a ssttrruuccttuurree C
C.. a a ppooiinntteer r tto o a a ssttrruuccttuurree D
D.. nnootthhiinngg
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 32.
32.
Using new may result in less
Using new may result in less _____ memory than using an array_____ memory than using an array A
A.. wwaasstteedd BB.. uusseedd C
C.. RRAAMM DD.. RROOMM View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 33.
33.
The most co
The most common opemmon operation used in coration used in constructors isnstructors is A
A.. aaddddiittiioonn B..B oovveerrllooaaddiinngg C
C.. aassssiiggnnmmeenntt DD.. ppoollyymmoorrpphhiissmm View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 34.
34.
In a simple 'if'
In a simple 'if' statement with no 'else'. What happens if the statement with no 'else'. What happens if the condition following the 'if is false?condition following the 'if is false? A.
A. ththe pe prorogrgram am sseaearcrchhes es ffoor tr thhe le lasast et elslse ie in tn the he prproogrgramam B
B.. nnootthhiinngg C.
C. cocontntrorol 'l 'fafalllls s ththrorougugh' h' to to ththe e ststatatememenent ft folollolowiwing ng 'i'if f D
D.. tthhe e bbooddy y oof f tthhe e ssttaatteemmeennt t iis s e xe xe ce cuutteedd E
E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 35.
35.
If two types of
If two types of errors may be thrown, you should write _______ errors may be thrown, you should write _______ A
A.. nno o ccaattcch h bblloocckkss B
B.. oonne e ccaattcch bh blloocck k wwiitth h ttwwo ao arrgguummeennttss C.
C. twtwo co catatch ch blblocock-k-oone ne wiwith th an an arargugummenent, t, anand d onone we witithohoutut D
D.. ttwwo co caattcch h bblloocckks s wwiitth h oonne ae ar gr guumme ne nt t eeaacchh 36.
36.
The name of
The name of a function enda function ends withs with A
A.. ddoouubblle e qquuootteess B
B.. ssiinngglle e qquuootteess C C.. ppaarreenntthheessiiss D. D. ## E E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 37.
37.
Which of the following is not
Which of the following is not a programming control structure?a programming control structure? A
A.. rreeppeettiittiioonn BB.. sseelleeccttiioonn C
C.. sseeqquueennccyy DD.. ssoorrttiinngg View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 38.
38.
The bitwise O
The bitwise OR operator is aR operator is a A
A.. uunnaarry y ooppeerraattoorr B
B.. bbiinnaarry y ooppeerraattoorr C
C.. tteerrnnaarry y ooppeerraattoorr D
D.. ooccttaal l ooppeerraattoorr E
E.. NNoonne e oof f tthhe e aabboovvee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 39.
39.
A class Stockltems has four data members and three function members. You define 50 objects as members of the class. Which is true? A class Stockltems has four data members and three function members. You define 50 objects as members of the class. Which is true? A.
A. OOnnly ly oone ne ccopopy oy of ef eacach oh of tf thhe te tnrnree ee fufuncnctitioonns es exixisststs B.
B. OOnnly ly oone ne ccopopy oy of ef eacach oh of tf thhe fe fouour dr daata ta mmeemmbberers es exixisststs C
C.. BBootth h ((aa) ) aannd d ((bb) ) aarre e ttrruuee D
D.. NNeeiitthheer r ((aa) ) nnoor r ((bb) ) iis s ttrruuee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 40.
40.
The continue sta
The continue statement should btement should be written onlye written only A
B
B.. iin n tthhe e nneesstteed d llooooppss C C.. oouuttssiidde e tthhe e bbooddy y oof f a a lloooopp D D.. aanny y wwhheerree E E.. NNoonne e oof f tthhe e aabboovvee 41. 41.
A major advantage of inheritance is A major advantage of inheritance is A.
A. rereduduccining tg thhe te tiimme ie it tt takakes es to to crcreaeate te nenew w oobjbjececttss B.
B. nonot ht havavining g to to tthihink nk ababoouut ht hoow w oobjbjecects ts wwilill bl be ue usseded C.
C. rereduducicing ng ththe ae ammouount nt of of mememmorory ry reqequiuirered td to eo exexecucute te a pa prorogrgrmmaa D.
D. enenababliling ng pepeopople wle who hho havave ne not sot stutudidied ed prprogograrammmmining tg to co crereatate use usefeful aul apppplilicacatitiononss View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 42.
42.
When a variable exists or is accessible, it is said to be When a variable exists or is accessible, it is said to be _____ _____ A
A.. iimmmmeeddiiaattee B
B.. iin n tthhe e ppaatthh C
C.. aavvaaiillaabbllee D
D.. iin n ssccooppee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 43.
43.
The feature that allow
The feature that allows the same os the same operations to be cperations to be carried out differentarried out differently depending oly depending on the object is __n the object is _____ ___ A
A.. ppoollyymmoorrpphhiissmm BB.. ppoollyyggaammyy C
C.. iinnhheerriittaannee DD.. mmuullttiittaasskkiinngg View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 44.
44.
Which of the following is a
Which of the following is a C++ class?C++ class? A
A.. >>>> BB.. rreeaadd(()) C
C.. cciinn DD.. iioossttrreeaamm View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 45.
45.
Precedence determines which operator Precedence determines which operator A
A.. iis s eevvaalluuaatteed d ffiirrsstt B
B.. iis s mmoosst t iimmppoorrttaanntt C
C.. iis s ffaasstteesstt D
D.. ooppeerraattees s oon n tthhe e llaarrggeesst t nnuummbbeerr E
E.. NNoonne e oof f tthhe e aabboovvee 46.
46.
When using the standard files that
When using the standard files that come with the C++ compiler, you should surround the header file name with come with the C++ compiler, you should surround the header file name with _____ _____ A
A.. ssqquuaarre e bbrraacckkeettss B
B.. aanngglle e bbrraacckkeettss C
C.. ppaarreenntthheesseess D
D.. qquuootteess
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 47.
47.
The loop conditio
The loop condition in a flowcn in a flowchart is represented hart is represented by a(n) _____ by a(n) _____ A
A.. ddiiaammoonndd BB.. oovvaall C
C.. ppaarraalllleellooggrraamm DD.. rreeccttaannggllee View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 48.
48.
Which of the following, if any, are
Which of the following, if any, are invalid names for a variable?invalid names for a variable? A
A.. bbaannkkAAccccoouunnttNNuummbbeerr B
B.. ffiirrsstt__NNaammee C
C.. ddoouubblleeNNuummbbeerr D
D.. ooppeerraattoorr E.
E. AAll ll oof f ththe e ababovove e arare e vavalilid d nnamames es fofor vr vaaririabableless View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 49.
49.
Inheritance is the principle that Inheritance is the principle that A.
A. clclasasseses ws witith th the he sasame me nanamme me musust bt be de dererivived ed ffrorom om one ne ananototheherr B.
B. knknowowleledgdge oe of a f a gegeneneraral cl catategegorory cy can an be be apapplplieied td to mo morore se spepecicifific oc objbjecectsts C.
C. C+C++ f+ fununctctioions ns mamay by be ue usesed od onlnly if y if ththey ey hahave ve lologigicacal pl prerededececessssororss D.
D. oone ne fufuncnctition on nanamme me may ay ininvovoke ke didiffffererenent mt metethohodsds
Section –IV Section –IV
1. 1.
You typically initialize
You typically initialize a String variable to a String variable to _____ _____ A
A.. aan n aasstteerriisskk B
B.. a a ssppaacce e eenncclloosseed d iin n ssiinngglle e qquuootteess C
C.. tthhe e nnuummbbeer r 00 D
D.. a a zzeerroo--lleennggtth h ssttrriinngg
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 2.
2.
The set of instruc
The set of instructions for how tions for how to tie a bow is to tie a bow is an example of an example of the _____ structthe _____ structureure A
A.. ccoonnttrrooll BB.. rreeppeettiittiioonn C
C.. sseelleeccttiioonn DD.. sseeqquueennccee E
E.. sswwiittcchhiinngg
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 3.
If no exception is
If no exception is thrown ________ thrown ________ A
A.. a a ccaattcch h bblloocck k wwiilll l ccaauusse e aan n eerrrroorr B
B.. tthhe fe fi ri rsst t ccaattcch h bbl ol occk k ccooddeed d wwiilll el ex ex eccuuttee C
C.. tthhe e llaasst t ccaattcch h bblloocck k ccooddeed d wwiitth h eex ex eccuuttee D
D.. aanny y ccaattcch h bbl ol occkks s ccooddeed d wwi ti th h bbe e bbyyppa sa ssseedd View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 4.
4.
A program that predicts the exact sequence in
A program that predicts the exact sequence in which events will take place is said which events will take place is said to be ________ to be ________ A
A.. ccoommppiilleedd BB.. iinntteerrpprreetteedd C
C.. pprroocceedduurraall DD.. oobbjjeecctt--oorriieenntteedd View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 5.
5.
A blueprint for creating an object
A blueprint for creating an object in C++ is called _____ in C++ is called _____ A
A.. a a ccllaassss B
B.. aan n iinnssttaannccee C
C.. a a mmaapp D
D.. a a ppaatttteerrnn E
E.. a a sskkeettcchh 6.
6.
The prototype fo
The prototype for a derived class cr a derived class constructor monstructor may include argumay include arguments forents for A
A.. ddaatta a mmeemmbbeerrs s oof f tthhe e ddeerriivveed d ccllaassss B
B.. ddaatta a mmeemmbbeerrs s oof f tthhe e bbaasse e ccllaassss C
C.. bbootth h ((aa) ) aannd d ((bb)) D
D.. nneeiitthheer r ((aa) ) nnoor r ((bb))
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 7.
7.
Overloading involves writing two or
Overloading involves writing two or more functions with ________ more functions with ________ A.
A. didiffffererenent nt naammes es anand d didiffffererenent at argrgumumeent nt liliststss B
B.. ddiiffffeerreennt nt naammees as annd td thhe se sa ma me ae arrgguummeennt lt li si stt C
C.. tthhe se sa ma me ne naamme ae annd dd diiffffeerreennt at arrgguummeennt lt liissttss D
D.. tthhe se sa ma me e nnaamme e aannd d tthhe e ssaamme e a ra rgguummeennt t lli si stt View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 8.
8.
You___________o
You___________overload function verload function templatestemplates A.
A. mmaay, y, as as lolong ng as as eaeacch vh verersision on hahas ts the he sasamme ae argrgumumenenttss B.
B. mamay, y, as as lolong ng as as eaeacch h veversrsioion n hahas s didiffffererenent t arargugummenentsts C
C.. mmuusstt D
D.. mmuusst t nnoott
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 9.
9.
You typically initialize
You typically initialize Character variaCharacter variables to _____ bles to _____ A
A.. a a ssppaacce e eenncclloosseed d iin n ddoouubblle e qquuootteess B
B.. a a ssppaacce e eenncclloosseed d iin n ssiinngglle e qquuootteess C
C.. tthhe e lleetttteer r OO D
D.. tthhe e nnuummbbeer r 00 E
E.. tthhe e vvaalluue e ffaallssee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 10.
10.
One way pointers are useful is to refer to a memory address that has no _____ One way pointers are useful is to refer to a memory address that has no _____ A
A.. nnaammee BB.. ccoonnssttaanntt C
C.. llooccaattiioonn DD.. ffiieelldd 11.
11.
A member function uses the correct object when you call it A member function uses the correct object when you call it becausebecause A.
A. a a ccoopy py of of tthe he oobjbjecect t iis s papassssed ed to to ththe e ffununcctitioonn B.
B. ththe ae addddreresss os of tf the he obobjejecct it is ps pasassesed td to to the he fufuncncttioionn C.
C. ththe ae addddreress ss of of ththe fe fununctctioion in is ps pasassesed d to to ananototheher fr fununctctioionn D.
D. ththe ae addddreress ss of of ththe e obobjeject ct is is reretuturnrned ed frfroom m ththe fe fununcctitionon View Answer Workspace Report Discuss in Forum
View Answer Workspace Report Discuss in Forum 12.
12. Two access
Two access specifiers in specifiers in C++ areC++ are A
A.. ppuubblliic c aannd d pprriivvaattee B
B.. iinnt t aannd d ddoouubbllee C
C.. ffoorrmmaal l aannd d iinnffoorrmmaall D
D.. vvooiid d aannd d ffrreeee
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 13.
13.
Which of the following is the
Which of the following is the fourth problem-solving step?fourth problem-solving step? A
A.. aannaallyyzze e tthhe e pprroobblleemm B.
B. evevaaluluatate ae and nd mmoodidiffy (y (if if nnececesessasarry) y) tthe he pproroggraramm C
C.. ccoodde e tthhe e aallggoorriitthhmm D
D.. ppllaan n tthhe e aallggoorriitthhmm E
E.. ddeesskk--cchheecck k tthhe e pprrooggrraamm
View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 14.
14.
Within parentheses, catch blocks can have Within parentheses, catch blocks can have _____ _____ A A.. nno o aarrgguummeennttss B B.. oonne e aarrgguummeenntt C C.. ttwwo o aarrgguummeennttss D
D.. aas s mmaanny y aarrgguummeenntts s aas s nneecceessssaarryy View Answer Workspace Report Discuss in Forum View Answer Workspace Report Discuss in Forum 15.
15.
The while loop