5. Which of these looping conditions will induce an infinite loop? The starting value of i is 0.
while (i>0)
b. for i in range (1, 1, 1) c. while(i==0)
Answers
Answered by
5
Option(c.) while() will induce an infinite loop.
Explanation:
- In while loop is used to execute a block of statements repeatedly until a given a condition is satisfied.
- And when the condition becomes false, the line immediately after the loop in program is executed.
- hence when the value of 'i' is initialized to and condition in the while loop is given to be , this condition holds to be true always
- hence, while() will start an infinite loop.
Answered by
4
Answer:
(c) while (i==0)
Similar questions