+ 1

What is the meaning of this loop:- for(jĀ =Ā 1;Ā jĀ <=Ā 10;Ā jĀ =Ā j-1)

24th Nov 2020, 9:25 AM
Shubham Maske
Shubham Maske - avatar
2 Answers
+ 3
Almost an infinite loop. The value of j is reduced by 1 at each iteration so it will always be less than 10.
24th Nov 2020, 9:35 AM
Avinesh
Avinesh - avatar
+ 3
The loop will decrement <j> until its value exceeds negative value limit of type, and wraps around to a big positive value. P.S. You didn't specify type of variable <j>.
24th Nov 2020, 9:37 AM
Ipang