3 ms·
The address of the nil byte + 1
by bno1 4y ago
The address of the nil byte + 1
- jessermeyer 4y agoBut isn't `""` 0 terminated? So the first offset past the nil byte is 0, interpreted as an address.
- oldgradstudent 4y ago"" is empty, so ""[0] is the nil byte. The code uses "" as an arbitrary address, and ""[1] as that address + 1. This way this-"" gets you 1-based index into the array. It assumes the compiler dedfuplicates strings, making the behavior of this program undefined.