Question | Answer |
how long a variable is available in memory | Scope |
variable declared outside a function and available to all parts of your program | Global variable |
variable declared inside a function and available only in the function | Local variable |
keyword to declare a global variable | Global |
determining the order of statement execution | Flow control |
conditional code based upon the value of true or false from provided expression | If |
only performs action if criteria is true | Single action if |
performs different actions depending on if criteria is true or false | Multiple action if |
placing one control structure inside another | Nesting |
conditional code based upon the value of a variable | Switch |
variable that contains the value a switch uses to make a decision | Case label |
statements in a switch that execute if no values match the case label | Default label |
groups of statements executed as a single unit | Functions |
variable passed to a function | Parameter |
variable received by a function | Argument |
returns a value from the function to the calling statement outside the function | Return statement |
repeating code | Loop |
indefinite style loop that executes while the criteria is true | While |
each repetition in a loop | Iteration |
the variable used in the criteria for the loop | Sentinel value |
a variable used to count the number of times a loop executes | Counter |
variable used to total data each loop execution | Accumulator |
a loop that cannot end | Infinite loop |
a definite loop that repeats from a start value to an end value | For |