3 ms·
Well, sizeof(char) is 1 by definition, so that will never change. Now sizeof(int) is indeed implementation defined (only a minimal range is guaranteed), so tech
by simias 14y ago
Well, sizeof(char) is 1 by definition, so that will never change. Now sizeof(int) is indeed implementation defined (only a minimal range is guaranteed), so technically two different C or C++ implementations might give different results.
It's even possible that sizeof(int) could be 1 on a certain architecture. In that case, both C and C++ would behave in the same way. It might happen on some architectures that don't support byte access and have 16bit-wide chars and ints?
- viraptor 14y ago> architectures that don't support byte access and have 16bit-wide chars and ints? 0x10c ?