3 ms·
Indexes start at 1. Offsets start at 0. Arrays in programming use offsets. for(int i=0;i<10;i++) { array[i] = x; } The error here is cal
by snarfy 4y ago
Indexes start at 1. Offsets start at 0.
Arrays in programming use offsets.
for(int i=0;i<10;i++)
{
array[i] = x;
}
The error here is calling it 'i' for index. It should be 'o' for offset.
- nomel 4y agoArrays in the programming languages you’re familiar with use offsets. Not all do [1]. 1. https://therenegadecoder.com/code/which-programming-languages-index-by-one/#programming-languages-with-one-based-indexing https://therenegadecoder.com/code/which-programming-language...