2 ms·
> An array of length 0 starts at 0 and ends with 0 But such an array does not "start" at 0 as it does not exist. You need an array of at least length-1 to "sta
by foobarbaz33 4y ago
> An array of length 0 starts at 0 and ends with 0
But such an array does not "start" at 0 as it does not exist.
You need an array of at least length-1 to "start" at 0.
- iopq 4y agoI can write a loop like this: `for(int i=0; i < 0; ++i)` and it will run 0 times, the exact amount of times I expected
- foobarbaz33 4y agoBut again your not starting at "index 0" of an array that exists. This loop is not processing any physically existing array. In fact the compiler would remove this block of code as it is a no-op.