Anecdote about C++ (#20361)
* Anecdote about C++ Linked the name of C++ to the update statement in a for loop. * minor fixes
This commit is contained in:
committed by
Niraj Nandish
parent
f8cfd5dd40
commit
394ea7aa93
@ -44,8 +44,11 @@ Next the condition is evaluated. If it holds true, the body of the loop is execu
|
|||||||
|
|
||||||
### update
|
### update
|
||||||
The update statement is used to alter the loop variable by using simple operations like addition, subtraction, multiplication or division.
|
The update statement is used to alter the loop variable by using simple operations like addition, subtraction, multiplication or division.
|
||||||
|
|
||||||
The update statement executes after the execution of the body of the loop.
|
The update statement executes after the execution of the body of the loop.
|
||||||
|
|
||||||
|
You will often see an increment operation as the update statement (e.g. i++, count++). This is often seen as one of the distinguishing features and possible name sources for the C++ language.
|
||||||
|
|
||||||
## IMPLEMENTATION:
|
## IMPLEMENTATION:
|
||||||
```C++
|
```C++
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
Reference in New Issue
Block a user