3 ms·
C has no concept of the kind of for loop used in the article, so there is no "how it works" in C.
by 0xffff2 9y ago
C has no concept of the kind of for loop used in the article, so there is no "how it works" in C.
- dragonwriter 9y agoWhile C has no for-in loop, the natural translation of that to a C style for loop and the C address-of operator would work the same way; the key thing is that student is a variable defined outside the loop whose value is modified each iteration, not a fresh variable allocated with each loop iteration.