Problemas
What will happen if you omit the increment part of a for loop? The loop won't run The loop will still run but never stop The loop will stop after one iteration The loop will throw an error
Roztwór
Domingo
professionell · Tutor durante 6 años
4.1
(269 Votos)
Respuesta
The loop will still run but never stop.In a for loop, the increment part is responsible for updating the loop control variable. If the increment part is omitted, the loop control variable will not be updated, and the loop will run indefinitely, causing an infinite loop.