Shared Flashcard Set

Details

CSCI 1301
Chpt 4 - Flow of Control
17
Computer Science
Undergraduate 1
11/07/2011

Additional Computer Science Flashcards

 


 

Cards

Term
loop
Definition
A portion of a program that repeats a statement or group of statements
Term
body
Definition
the statement or group of statements to be repeated in a loop
Term
iteration
Definition
each repetition of the loop body
Term
do-while loop vs while loop
Definition
the body of a do-while loop is always executed at least once,
a while loop may not be executed at all.
Term
infinite loop
Definition
a loop that iterates its body repeatedly without ever ending
Term
for loop
Definition
lets you write a loop that is controlled by a counter
Term
empty/null statement
Definition
a semicolon by itself,
Term
local variable
Definition
a variable that cannot be used outside of a loop
Term
scope
Definition
the portion of a program in which a variable has meaning
Term
comma operator
Definition
a comma used to separate initialization actions
Term
for-each statement
Definition
used when you have a collection of data, like an enumeration
Term
count-controlled loops
Definition
loops that know the number of iterations before the loop starts
Term
ask before iterating
Definition
a way of asking the user if it is time to end the loop
Term
sentinel value
Definition
signals the end of the input for lengthy input lists
Term
off-by-one error
Definition
loop bug that causes your loop to repeat its body either one too many times or one too few times
Term
tracing variable
Definition
watching the variables change value while the program is running
Term
assertion check
Definition
to check and see if an assertion is true and if its not you can stop the program and display an error message
Supporting users have an ad free experience!