🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #4730

Re: Two questions - Pointer equality and ...

#4730
From: Mark Brader
Date: Wed, 31 Jan 1996 17:27
11 lines
923 bytes
> Logically the proper tye of a string literal should be const char*
> rather than char* ...

Actually, the type of a string literal N characters long is char[N+1].
You can see this by using sizeof.  ("N characters long" is handwaving,
of course, but good enough for this purpose, I think.)
-- 
Mark Brader, msb@sq.com        "do right; have fun; make money"
SoftQuad Inc., Toronto              -- Ian Darwin on Yuri Rubinsky (1952-96)

My text in this article is in the public domain.
Technical Details
Message-ID: <1996Jan31.172724.17337@sq.com>
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!torn!sq!msb
References: <4elq8a$j0b@taurus.fccc.edu> <TANMOY.96Jan30150808@qcd.lanl.gov> <9601310155.AA07417@dxmint.cern.ch> <4emonm$kqc@fnclub.fnal.gov>

Show Full Headers
Complete Article Headers
Newsgroups: comp.std.c
Path: arc1-ca.pugleaf.net!howland.reston.ans.net!torn!sq!msb
From: msb@sq.com (Mark Brader)
Subject: Re: Two questions - Pointer equality and ...
Message-ID: <1996Jan31.172724.17337@sq.com>
Organization: SoftQuad Inc., Toronto, Canada
References: <4elq8a$j0b@taurus.fccc.edu> <TANMOY.96Jan30150808@qcd.lanl.gov> <9601310155.AA07417@dxmint.cern.ch> <4emonm$kqc@fnclub.fnal.gov>
Date: Wed, 31 Jan 1996 17:27:24 GMT