Cpp - How often is the following loop executed?

Question

How often is the following loop executed?

unsigned int limit = 1000; 
for (int i = -1; i < limit; i++) {
   ;
}

Answer

When called, the value -1 is converted to unsigned int.

The pattern of -1 is interpreted as unsigned, which yields the greatest unsigned value.

On a 32-bit system, -1 has the bit pattern 0xFFFFFFFF, which, when interpreted as unsigned, corresponds to the decimal value 4 294 967 295.

The statement within the loop is not executed at all!

In the expression i < limit the value of variable i, -1, is implicitly converted to unsigned int and thus it represents the greatest unsigned value.