• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/21

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

21 Cards in this Set

  • Front
  • Back

while loop

Repeats a statement or group of statements while a given condition is true. It tests the condition before executing the loop body.

for loop

Execute a sequence of statements multiple times and abbreviates the code that manages the loop variable.

do...while loop

Like a ‘while’ statement, except that it tests the condition at the end of the loop body.

for loop

is a repetition control structure that allows you to efficiently write a loop that needs to execute a specific number of times.

The init step (for loop)

is executed first, and only once. This step allows you to declare and initialize any loop control variables. You are not required to put a statement here, as long as a semicolon appears.

the condition (for loop)

If it is true, the body of the loop is executed. If it is false, the body of the loop does not execute and flow of control jumps to the next statement just after the for loop.

increment statement

This statement allows you to update any loop control variables. This statement can be left blank, as long as a semicolon appears after the condition.

for and while loops

which test the loop condition at the top of the loop

do...while

loop checks its condition at the bottom of the loop.A do...while loop is similar to a while loop, except that a do...while loop is guaranteed to execute at least one time.

Loop control statements

change execution from its normal sequence. When execution leaves a scope, all automatic objects that were created in that scope are destroyed.

break statement

Terminates the loop or switch statement and transfers execution to the statement immediately following the loop or switch.

continue statement

Causes the loop to skip the remainder of its body and immediately retest its condition prior to reiterating.

goto statement

Transfers control to the labeled statement. Though it is not advised to use goto statement in your program.

break statement

is encountered inside a loop, the loop is immediately terminated and program control resumes at the next statement following the loop.

The continue statement

works somewhat like the break statement. Instead of forcing termination, however, continue forces the next iteration of the loop to take place, skipping any code in between

label

is an identifier that identifies a labeled statement. A labeled statement is any statement that is preceded by an identifier followed by a colon (:).

if statement

An ‘if’ statement consists of a boolean expression followed by one or more statements.

if...else statement

An ‘if’ statement can be followed by an optional ‘else’ statement, which executes when the boolean expression is false.

switch statement

A ‘switch’ statement allows a variable to be tested for equality against a list of values.

nested if statements

You can use one ‘if’ or ‘else if’ statement inside another ‘if’ or ‘else if’ statement(s).

nested switch statements

You can use one ‘switch’ statement inside another ‘switch’ statement(s).