Thank you for the reply.K%4 is not a logical expression. % is the modulo operator. In this case it returns 0, 1, 2, or 3 depending on the value of K.
My guess is, C is treating 0 as false, and non zero as true.
The inner loop prints world when K is 150 (150%4=2), when K is 125 (125%4=1), and stops when K is 100 (100%4=0)
This is poor programming style. Just my opinion.
for(j=0;0<(k%4);j++)
-=
operator, so I can't make assumptions.Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.