CC113b Flashcards
use the if condition if there is only
one condition.
If statement –
use this if there are two
conditions
if … else statement –
this may be used as an alternative
to if…else if…else
switch() … case
is used for executing a block of statements repeatedly
until a particular condition is satisfied.
loop
is an entry-controlled loop which first
checks the condition, then executes the code.
while
– is an exit-controlled loop which
first executes the code, then checks the
condition.
do while
– is an entry-controlled loop that includes
the initial value, test condition and
increment/decrement.
for
is a one of the data structure in C++,
that can store a fixed-size sequential collection
of elements of the same data type.
array