1/11
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Sequential Control Structure
Refers to the line-by-line execution by which statements are executed sequentially, in the same order in which they appear in the program.
Selection Control Structure
Allows one set of statement to be executed if a condition is true and another set of actions to be executed if a condition is false.
if
Used to specify a block of code to be executed, if a specified condition is true
else
Used to specify a block of code to be executed, if the same condition is false
else if
Used to specify a new condition to test, if the first condition is false
switch
Used to specify many alternative blocks of code to be executed
The simplest of the three fundamental control structure.
Sequential Control Structure
The Nested if Statements
you can use one if or else if statement inside another if or else if statement(s).
It simplifies the process of checking the same variable for a set of different equality values.
The switch-case conditional
break keyword
This will stop the execution of more code and case testing inside the block.
default keyword
specifies some code to run if there is no case match
The Nested switch Statement
a programming construct where one switch statement is placed inside another switch statement.