Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren0
Why is this code skipping the "for" part
1 Antwort
+ 3
In C++, the behavior of using an uninitialized variable is undefined, so it can have any value, which may not be what you expect.
To fix this issue, you should initialize i to 0 in the for loop declaration