CSCE 121 Chapter Notes - Chapter 5: Semicolon, Include Directive, Fibonacci Number

36 views9 pages

Document Summary

True/false: the statement in the body of a while loop acts as a decision maker. Ref: 261: the following while loop terminates when j > 20. j = 0; while (j < 20) j++; Ref: 262: the number of iterations of a counter-controlled loop is known in advance. Ref: 264: assume all variables are properly declared. The output of the following c++ code is 2 3 4 5. n = 1; while (n < 5) n++; cout << n << " "; Ref: 265: in a counter-controlled while loop, the loop control variable must be initialized before the loop. Ref: 264-265: in the case of the sentinel-controlled while loop, the first item is read before the while loop is entered. Ref: 268: in a sentinel-controlled while loop, the body of the loop continues to execute until the eof symbol is read. Ref: 268: the control variable in a flag-controlled while loop is a bool variable.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents