mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-11-23 14:17:02 +03:00
Add note to while loop in C.
This commit is contained in:
parent
e9c92321f4
commit
642e7c551e
@ -260,7 +260,7 @@ int main() {
|
||||
|
||||
// While loops exist
|
||||
int ii = 0;
|
||||
while (ii < 10) {
|
||||
while (ii < 10) { //ANY value not zero is true.
|
||||
printf("%d, ", ii++); // ii++ increments ii in-place
|
||||
// after yielding its value ("postincrement").
|
||||
} // => prints "0, 1, 2, 3, 4, 5, 6, 7, 8, 9, "
|
||||
|
Loading…
Reference in New Issue
Block a user