CC102- MIDTERM PROGRAMMING Flashcards
In C++ programming language, we sometimes require to compare values and expressions. This comparison allows us to determine relationships, make decisions, and control the flow of our programs.
The ———- in C++ provide the means to compare values and evaluate conditions.
relational operators
are used to perform arithmetic or mathematical operations on the operands.
arithmetic operators
When the condition
becomes false, program
control passes to the line
immediately following the
loop.
while loop
If it is true, the loop
executes and the process
repeats itself (body of
loop, then increment step,
and then again condition).
After the condition
becomes false, the for
loop terminates
for loop
- If the condition is true, the
flow of control jumps back
up to do, and the
statement(s) in the loop
execute again. This process
repeats until the given
condition becomes false
do while
When the break
statement is encountered
inside a loop, the loop is
immediately terminated,
and program control
resumes at the next
statement following the
loop.
break statement
- The continue statement
works somewhat like the
break statement. Instead of
forcing termination,
however, continue forces
the next iteration of the
loop to take place, skipping
any code in between.
continue statement
A loop becomes infinite
loop if a condition never
met or false.
infinite loop
is a series of elements of the same type placed in contiguous memory locations that can be individually referenced by adding an index to a unique identifier.
array