Learn C++ fast - Sixth tutorial(Loops in C++ and increment/decrement operators) by GhoUL

Опубликовано: 11 Август 2026
на канале: GhoUL's Tutorials
234
2

Summary:
increment/decrement operators(++/--): These operators are used to either increase or decrease the value of a variable by 1.
pre-increment/decrement : It first increases the value of the variable it is used with and then statement.
post-increment/decrement: It first executes the statement and then increases the value of the variable.

Loops-
for- for loops tests for conditions at the beginning of the program. Variable can be intialized in the brackets() of the loop. Won't run if test fails.
while- It tests for condition at the start of the loop. Variable can't be initialized within brackets(). It wont run if the test fails.
do-while : It will run atleast once since the conditions are tested at last.