Charles Dickman wrote:
Shouldn't it be (i +
sizeof(int)*"He...\n") ?
No. There shouldn't be a multiplication by sizeof(anything), because C
does the scaling automatically, but the automatic scaling has to be of
the size of the target of the pointer, which is char, not by the size of
the index. The automatic scaling is such that indices 0, 1, 2, etc.
always refer to successive elements of the target type, and not to
successive bytes.
Eric