4/7, for loop, if we want to iterate strings with in a array in reverse order, why stopping point is 'i>=0' as in each iterate i is greater than 0 and logically iteration should be stopped?


#1

4/7, for loop, if we want to iterate strings with in a array in reverse order, why stopping point is 'i>=0' as in each iterate i is greater than 0 and logically iteration should be stopped?


#2

well, if you want to loop in reverse order (from right to left) you starting point depends on the word, but lets say we have hello, then you starting point is 5. (i = 5)

then each iteration you reduce i, so you will get to zero?


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.