Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Your for loop works, whereas the one in the parent comment would run forever, correct?

The other way around: size_t is an unsigned type, so decrementing 0 will wrap around to SIZE_MAX, a value that is positive as well as greater than 9. This means counter to your intuition, the first loop will terminate and the second one won't.



view as:

Legal | privacy