Article View: comp.sys.atari.st
Article #26304Re: sizeof("string")
From: dillon
Date: Tue, 14 Apr 1987 22:11
Date: Tue, 14 Apr 1987 22:11
20 lines
925 bytes
925 bytes
:main()
:{
: printf( "%d\n", sizeof( string ) );
: printf( "%d\n", sizeof( strpt ) );
: printf( "%d\n", sizeof( "hello" ) );
:}
:
:the result would be:
:
:20
:4
:4
:
:Dave Burris
Sorry Dave, your wrong. Not only should sizeof("hello") be 6
theoretically, but every compiler I've ever used (and I have NOT used
megamax) returns 6. Just how long have you been programming in C?
-Matt
Technical Details
Message-ID:
<8704142211.AA27609@cory.Berkeley.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ames!ucbcad!ucbvax!CORY.BERKELEY.EDU!dillonShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watnot!watmath!clyde!rutgers!lll-lcc!ames!ucbcad!ucbvax!CORY.BERKELEY.EDU!dillon
From: dillon@CORY.BERKELEY.EDU.UUCP
Newsgroups: comp.sys.atari.st
Subject: Re: sizeof("string")
Message-ID: <8704142211.AA27609@cory.Berkeley.EDU>
Date: Tue, 14-Apr-87 17:11:12 EST
Article-I.D.: cory.8704142211.AA27609
Posted: Tue Apr 14 17:11:12 1987
Date-Received: Wed, 15-Apr-87 23:54:10 EST
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 20