93.7k views
2 votes
Not having an increment or decrement statement within in a loop may cause an infinite loop

A) True
B) False

User Bokambo
by
7.7k points

1 Answer

1 vote

Final answer:

Not having an increment or decrement statement within a loop may cause an infinite loop.

Step-by-step explanation:

True. Not having an increment or decrement statement within a loop may cause an infinite loop. An infinite loop occurs when the condition for exiting the loop is never met, causing it to repeat indefinitely. For example, if you have a loop that does not increment or decrement the loop counter, the loop will continue to execute forever, resulting in an infinite loop.

User Mosaku Abayomi
by
7.8k points