Program Statements Flashcards
Block is formed by placing
more than one statement inside curly braces ({}).
Compound statement
This is made up of a null expression
followed by a semicolon.
Null statement
These are also
known as a simple statement.
Expression and function call statements
Multi-decision branch is for?
Switch/case
Make decision before branching
Conditional branches
Single-decision branch
if/else
This allow the programmer to alter the flow of a program control.
Branch statements
These branches are direct branches which involve no decision. The goto statement is an example of an unconditional branch.
Unconditional branches
An ability to repetitively execute a set of statements.
Iterative Statement
Execute-before-test. The body of the loop is always executed at least once.
do-while statement
This may be described as
test-before-execute. If the controlling condition results initially to a zero or false value, the body of the loop is never executed.
while and for statements
similar to break statement, except it does not cause the loop to terminate. Rather it causes the loop to be continued.
Continue Statement
These are used to interrupt the normal flow of loops and the switch
statement.
Break & Continue Statement
This statement can skip a line of code
Continue Statement
This statement interrupts the normal sequential flow of a program, without involving a decision.
goto statement