🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c
Article #5033

Re: Q: char **foo, char *foo[], and char foo[][] ?

#5033
From: Jerry Coffin
Date: Thu, 18 Apr 1996 19:10
16 lines
956 bytes
In article <4l33ok$oo2@Sherlock.lectra.fr>, phil@rd.lectra.fr says...
> Considering the 3 following declarations:
> 
> 1 - char **foo;
> 2 - char *foo[];
> 3 - char foo[][];
> 
> I know that there is a (big !) difference in memory reservation, but I do
> not know if foo IS or IS NOT of the same type in these three cases.
[ ... ] 

In declaring a parameter to a function, any declaration of an array is treated 
as a declaration of a pointer.  In all other situations, the two are separate 
and distinct.
    Later,
    Jerry.
Technical Details
Message-ID: <MPLANET.317693a7jcoffin989d39@news.rmii.com>
Path: arc1-ca.pugleaf.net!news.rmii.com!usenet
References: <4l33ok$oo2@Sherlock.lectra.fr>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!news.rmii.com!usenet
From: jcoffin@rmii.com (Jerry Coffin)
Newsgroups: comp.std.c
Subject: Re: Q: char **foo, char *foo[], and char foo[][] ?
Date: Thu, 18 Apr 1996 13:10:31 -0600
Organization: TAEUS
Message-ID: <MPLANET.317693a7jcoffin989d39@news.rmii.com>
References: <4l33ok$oo2@Sherlock.lectra.fr>
NNTP-Posting-Host: slip22144.rmii.com
X-Newsreader: MicroPlanet News32 v1.00 Beta Build 302