OT: Requesting C advice
mjs at clemson.edu
Thu May 24 14:03:52 UTC 2007
On Thu, 24 May 2007, Mike McCarty wrote:
> Mike McCarty wrote:
>> Matthew Saltzman wrote:
>>> sizeof(char) == 1 is guaranteed by the standard. There's no reference to
>>> "bytes", but it is commonly accepted that the char type is a byte.
>> Erm, from the Standard:
>> [#1] byte
>> addressable unit of data storage large enough to hold any
>> member of the basic character set of the execution
> Also from the Standard:
> [#1] character
> bit representation that fits in a byte
> 188.8.131.52 The sizeof operator
> [#2] The sizeof operator yields the size (in bytes) of its
> operand, which may be an expression or the parenthesized
> name of a type. The size is determined from the type of the
> operand. The result is an integer. If the type of the
> operand is a variable length array type, the operand is
> evaluated; otherwise, the operand is not evaluated and the
> result is an integer constant.
> The word "byte" appears dozens of times in the Standard, not counting
> its appearance in the word "multibyte".
OK, OK you win. Sheesh!
Clemson University Math Sciences
mjs AT clemson DOT edu
More information about the users