Briefly describe the structure of a for loop.
What will be an ideal response?
You begin a for statement with the keyword for followed by a set of parentheses. Within the parentheses are three sections separated by exactly two semicolons. The three sections are usually used for:
* Initializing the loop control variable
* Testing the loop control variable
* Updating the loop control variable
As with an if or a while statement, you can use a single statement as the body of a for loop, or you can use a block of statements enclosed in curly braces.
You might also like to view...
is a set of methodologies that try to get software implemented quickly with fewer resources than previous methodologies.
a. Refactoring. b. Agile software development. c. Design patterns. d. None of the above.
When devising a solution, you should consider what kind of undesirable results the proposed solution might have. What can you create to reverse your changes if the proposed solution does not succeed?
What will be an ideal response?