Description of this paper





1. (TCO 5) In a count-controlled loop, the counter performs which of the following actions? (Points: 3);a)Counter initialization;b)Counter testing;c)Counter adjustment;d)All of the above;2. (TCO 5) Which repetition structure is designed to have the code execute at least one time? (Points: 3);a)For loop;b)Do in a while loop;c)While loop;d)Do-while loop;3. (TCO 10) Bug errors are _____ errors. (Points: 3);a) logic;b)syntax;c)binary;d);4. (TCO 5) Which of the following is true about the for loop? (Points: 3);a) It is a posttest loop.;b)It is a pretest loop.;c)It is an infinite loop.;d)All of the above are true and correct about the for loop.;5. (TCO 5) A loop that is inside another loop is called an _____. (Points: 3);a)outer loop;b)inner loop;c)infinite loop;d)None of the above;6. (TCO 5) Which of the following is a poor programming practice? (Points: 3);a)Indenting the statements in the body of each control structure;b)Using floating-point values for counters in counter-controlled repetition;c)Nesting multiple repetition structures;d)Placing vertical spacing above and below control structures;7. (TCO 5) A loop that falls entirely within the body of another is a(n) ____ loop. (Points: 3);a) outer;b)inner;c)parent;d)restricted;8. (TCO 5) How many times will this for loop execute?;for (int i = 10, i > 0, --i) (Points: 3);a)Seven;b)Nine;c)10;d)Eight;9. (TCO 5) The segment of code shown below displays "Hello!" _____ times.;int count;const int NUM_LOOPS = 5;count = 0;while(count < NUM_LOOPS);cout<< "Hello!" < n1;cin >> n2;cin >> n3;cin >> n4;cin >> n5;sum = n1 + n2 + n3 + n4 + n5;cout << "Sum = " << sum << endl;return 0


Paper#65576 | Written in 18-Jul-2015

Price : $22