Here's another one. Handy "syntax" that makes it possible to iterate an unsigned type from N-1 to 0. (Normally this is tricky.) for (unsigned int i = N; i --> 0;) printf("%d\n", i); This --> construction also works in JavaScript and so on.
how would you iterate over every possible value of a unsigned int?
unsigned int x = 0;
const unsigned int max = ~x;
while (x
Or, #include
const unsigned int max = UINT_MAX;