Xref: utzoo comp.lang.c:9316 comp.arch:4341 Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ll-xn!mit-eddie!bbn!bbn.com!emiller From: emiller@bbn.com (ethan miller) Newsgroups: comp.lang.c,comp.arch Subject: Re: Bit Addressable Architectures Message-ID: <23396@bbn.COM> Date: 14 Apr 88 14:46:07 GMT References: <11702@brl-adm.ARPA> <243@eagle_snax.UUCP> <2245@geac.UUCP> <8646@eleazar.Dartmouth.EDU> <877@cresswell.quintus.UUCP> Sender: news@bbn.COM Reply-To: emiller@bbn.com (ethan miller) Organization: BBN Labs (Cambridge, MA) Lines: 20 Summary: Expires: Sender: Followup-To: Keywords: In article <877@cresswell.quintus.UUCP> ok@quintus.UUCP (Richard A. O'Keefe) writes: =>In article <8646@eleazar.Dartmouth.EDU>, major@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@bbn.com | start working." Disclaimer: BBN didn't write this. | -- The Hitchhiker's Guide to the Galaxy *-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*