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
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
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