Bit Addressable Architectures

SuperUser root at mfci.UUCP
Fri Apr 15 05:06:03 AEST 1988


Expires:

Sender:

Followup-To:

Distribution:

Keywords:


In article <8646 at eleazar.Dartmouth.EDU> major at eleazar.Dartmouth.EDU (Lou Major) writes:
}
}*ahem*
}
}char foo[]="This is a test.";
}
}sizeof (foo) == sizeof (char *)
}
}NOT the number of machine bytes/words those characters take up. (16, for most
}typical installations)

Not on this planet.  From K&R:  "When applied to an array, the result is the
total number of bytes in the array."  The parentheses don't alter this fact.
The example above is confusing because the number of characters in foo is
exactly 16 (15 in the quotes plus the final null character).



More information about the Comp.lang.c mailing list