1. The document provides instructions for an exam, including turning off cell phones, bringing one notecard, and bubbling in personal information on the scantron form.
2. It asks the test taker to sign below and print their name, acknowledging they will not cheat or receive outside help on the exam.
3. The remainder of the document contains 20 multiple choice questions testing C++ programming knowledge.
1. The document provides instructions for an exam, including turning off cell phones, bringing one notecard, and bubbling in personal information on the scantron form.
2. It asks the test taker to sign below and print their name, acknowledging they will not cheat or receive outside help on the exam.
3. The remainder of the document contains 20 multiple choice questions testing C++ programming knowledge.
1. The document provides instructions for an exam, including turning off cell phones, bringing one notecard, and bubbling in personal information on the scantron form.
2. It asks the test taker to sign below and print their name, acknowledging they will not cheat or receive outside help on the exam.
3. The remainder of the document contains 20 multiple choice questions testing C++ programming knowledge.
4 What uoes the expiession C3$8 # C? # C? A C? evaluate to.
01 C 41 3 51 $ 61 8 E) None of the above
4
5 If the usei types! #$% & '$% ()*+),-. what uoes the following coue snippet output.
;'<.=) D > $B E(+ : > 3B F,-G F, > H2HB FE( II D II F, II :B F'<+ JJ D % :B
A) !9! B) 2 C) K D) K9! E) None of the above
6 If the usei types! #$% & '$% ()*+),-. what uoes the following coue snippet output. (Note: this is a uiffeient question than the one above -- ieally it is -- ieau closely)
;'<.=) D > $B E(+ : > 3B F,-G F, > H2HB FE( II : II D II F,B F'<+ JJ D % :B
A) ? B) C C) 3 D) 39! E) None of the above
7 If the usei types: /0 123) ()*+),-, what uoes the following coue snippet output.
4+,5*6 L+GB M)+=E()NFE(O L+G1B F'<+ JJ L+GB
A) P' B) 4=<) C) P D) P' 4=<) E) None of the above
5
8 Consiuei the following function: .''= EL5'G'(-+E'(6-:NE(+ (<Q1 R E* N(<Q A C?? >> ?1 R E* N(<Q A 8?? >> ?1 R G)+<G( +G<)B S )=L) R G)+<G( *-=L)B S S )=L) E* N(<Q A 8 >> ?1 R G)+<G( +G<)B S )=L) R G)+<G( *-=L)B S S Which of the following test suites thoioughly test the above function by testing eveiy path thiough the function.
A) CTTTO 3???O 3??C B) CUTTO CT??O CT?CO CT?3 C) CU??O 3???O 3??U D) CT??O CT$?O CT2?O 3???
E(+ Q-E(N1 R E(+ D > CB E(+ : > $B '=-*NDO :1B F'<+ JJ D JJ VO V JJ :B G)+<G( ?B S
/'E; '=-*NE(+ DO E(+ :1 R E(+ +)QY > DB D > :B : > +)QYB G)+<G(B S
01 CO C 41 CO $ 51 $O C 61 $O $
14 What uoes the following coue fiagment piint if the usei enteis: 7% 8#()*+),-
E(+ +)QY)G-+<G)O -Q'<(+B FE( II +)QY)G-+<G) II -Q'<(+B
E* N+)QY)G-+<G) I ?1 R E* N-Q'<(+ I> C?1 R F'<+ JJ V4<E=; Q) - *GE)(;V JJ )(;=B S )=L) R F'<+ JJ V\, ('` a+HL +'' F'=; +' L('ZV JJ )(;=B S S
A) 4<E=; Q) - *GE)(; B) \, ('` a+HL +'' F'=; +' L('Z C) &'() '* +,) -.'/)
8
15 What uoes the following C++ piogiam piint.
^E(F=<;) JE'L+G)-QI <LE(M (-Q)LY-F) L+;B
E(+ Q-E(N1 R E(+ D > 83B E* ND I> ?1 R F'<+ JJ Va ;'(H+ ,-/) - L]<==9 \G .'()L9VB S )=L) E* ND J> 831 R F'<+ JJ VaHQ \=-* -(; a =E]) Z-GQ ,<ML9VB S )=L) R F'<+ JJ Va+HL L' F<+)9 bE]) =E++=) .-.: <(EF'G(VB S G)+<G( ?B F'<+ JJ V\,O =''] -+ +,-+9 aH/) .))( EQY-=);9VB S
A) a ;'(H+ ,-/) - L]<==9 \G .'()L9 B) aHQ \=-* -(; a =E]) Z-GQ ,<ML9 C) a+HL L' F<+)9 bE]) =E++=) .-.: <(EF'G( 61 \,O =''] -+ +,-+9 aH/) .))( EQY-=);9 E) It will iun with no eiiois, but piint nothing.
16 Consiuei the following function Q-GL,Q-=='Z:
E(+ Q-GL,Q-=='ZN.''= YO .''= c1 R E(+ D > ?B E(+ : > 3B
G)+<G( NND I C1 dd Y1 ee NN: J $1 dd c1B S
What uoes the function Q-GL,Q-=='Z ietuin. 01 ? 41 C 51 f,) G)+<G( /-=<) ;)Y)(;L '( +,) /-=<)L '* .'+, Y -(; c 61 f,) G)+<G( /-=<) ;)Y)(;L '( +,) /-=<) '* Y .<+ ('+ c 71 f,) G)+<G( /-=<) ;)Y)(;L '( +,) /-=<) '* c .<+ ('+ Y
9
17 What uoes the following coue snippet piint.
E(+ D > CB Z,E=) ND J !1 R D %> D @ CB S F'<+ JJ D JJ V V JJ )(;=B
A) C B) ! C) 2 D) C 3 2 E) 3 2
18 uiven the following function implementation, what uoes 932:;<%= ietuin.
E(+ .<=;-NE(+ (1 R E(+ E > ?B Z,E=) NE J (1 R E > E @ CB ( > ( @ CB S G)+<G( EB S