Bit Addressable Architectures

ethan miller emiller at bbn.com
Fri Apr 15 00:46:07 AEST 1988


Expires:

Sender:

Followup-To:

Keywords:


In article <877 at cresswell.quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
=>In article <8646 at eleazar.Dartmouth.EDU>, major at eleazar.Dartmouth.EDU (Lou Major) writes:
=>> 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)
=>
=>Wrong.  The answer *is* 16.  This is one of the few cases where
=>foo and &(foo[0]) are different.  I _tried_ this to make sure I was right.
=>That's always a good idea.

Sure is.  What did you try?  _I_ just tried printing foo and &(foo[0]), and
they are the same.  BTW, I also tried sizeof (foo), and it is 16.

ethan
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
Ethan Miller			   | "If they don't keep on exercising
BBN Laboratories (Cambridge, MA)   |  their lips, he thought, their brains
ARPAnet: emiller at bbn.com           |  start working."
Disclaimer: BBN didn't write this. |   -- The Hitchhiker's Guide to the Galaxy
*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*



More information about the Comp.lang.c mailing list