5 ms·
they are accessed using pointer arithmetic, if you wanted them to contain length data, you would need a different access pattern. I think one of the great featu
by quelsolaar 7y ago
they are accessed using pointer arithmetic, if you wanted them to contain length data, you would need a different access pattern. I think one of the great features of C is that it doesn't do anything under the hood, its all explicit. If you want to bounds check, then do it.
- WalterBright 7y ago> they are accessed using pointer arithmetic Not always. Consider: int a[3]; a[1] = 2; This is not using pointer arithmetic. Dump the generated code if you don't believe me :-)
- quelsolaar 7y agoIts still pointer arithmetic, its just done compile time rather then at execution. Still, you deserve style points :-)
- saagarjha 7y agoTell that to mov DWORD PTR [rsp - 8], 2