NAME

Question types


Start with


Question limit

of 19 available terms

Print test

19 Multiple choice questions

  1. sets the initial values before the loop begins
  2. %i = 1 column
    %2i = 2 columns
    %3i = 3 columns
  3. for ( i = 0, j= 10........
  4. int count = 1;

    while ( count <= 5 )
    {
    NSLog(@"%i", count);
    ++count;
    }
  5. ==
    !=
    <
    <=
    >
    >=
  6. while (expression)
    program statement

    Loops until the expression is false
  7. specifies the condition or conditions necessary for the loop to continue
  8. Any statement that appears after the continue statement is skipped.
  9. initial expression
    while (loop condition)
    {
    program statement
    loop expression
    }
  10. for (initial expression; loop condition; loop expression)
    {
    program statement
    program statement
    program statement
    }
  11. --

    example --n or n--
  12. 1. The intial expression is evaluated first. This expression usually sets a variable that is used inside the loop, generally referred to as the index variable, to some intial value (generally 0 or 1)

    2. The looping condition is evaluated. If the condition is not satisfied (the expression is false), the loop immediately terminates. Execution continues with the program statement that immediately follows the loop.

    3. The program statement that constitutes the body of the loop is executed.

    4. The looping expression is evaluated.

    5. Return to Step 2
  13. for (initial expression; loop condition; loop expression)
    program statement
  14. Enables the programmer to type values into the program
  15. do
    program statement
    while (expression)

    Tests the loop at the end rather than at the beginning so it runs at least once
  16. ++

    example: ++n or n++
  17. Leaves a loop as soon as a condition occurs

    break;
  18. For, while, do
  19. int n, triangularNumber;

    triangularNumber = 0;

    for ( n = 1; n <=200; n = n + 1)
    triangularNumber += n;

    The 200th triangular number