






Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
Prepare for your exams
Study with the several resources on Docsity
Earn points to download
Earn points by helping other students or get them with a premium plan
A series of exam review questions from the essential c++ and control structures courses. The questions cover various topics such as identifier validation, variable declaration, control structures, and loops. Students are asked to identify valid identifiers, write boolean expressions, determine the values of variables, and use for loops.
Typology: Study notes
1 / 10
This page cannot be seen from the preview
Don't miss anything!







Exam I Review Essential C++
Exam I Review Essential C++
Exam I Review Control Structures
Exam I Review Control Structures
1 # i n c l u d e < i o s t r e a m > 2 u s i n g n am esp ace s t d ; 3 4 i n t main ( v o i d ) 5 { 6 i n t x ( 3 + 4 % 6 ) ; 7 8 i f ( x <= 4 ) { 9 c o u t << " Treat your password like your toothbrush. " << e n d l ; 10 } e l s e { 11 s w i t c h ( x ) { 12 c a s e 5 : 13 c o u t << " Don ’ t let anybody else use it , " << e n d l ; 14 b r e a k ; 15 c a s e 6 : 16 c o u t << " and get a new one " << e n d l ; 17 18 c a s e 7 : 19 c o u t << " every six months. " << e n d l ; 20 b r e a k ; 21 d e f a u l t : 22 c o u t << " -- Clifford Stoll " << e n d l ; 23 b r e a k ; 24 } 25 } 26 r e t u r n 0 ; 27 }
Exam I Review Control Structures
Exam I Review Control Structures