[prev in list] [next in list] [prev in thread] [next in thread] 

List:       fedora-list
Subject:    Re: gcc not compiling
From:       Michael Hennebry <hennebry () web ! cs ! ndsu ! nodak ! edu>
Date:       2005-10-31 23:35:54
Message-ID: 20051031173305.A73587-100000 () web ! cs ! ndsu ! nodak ! edu
[Download RAW message or body]

On Mon, 31 Oct 2005, Sjoerd Mullender wrote:

> Derek Martin wrote:
> > On Mon, Oct 31, 2005 at 01:30:44PM -0600, STYMA, ROBERT E (ROBERT) wrote:
> >
> >>The syntax:
> >>int main(int argc, char **argv)
> >>works, but most of the C books I have seen recommend
> >>the *argv[] version.
> >
> >
> > I meant to comment that these two different notations are functionally
> > identical; an array name is nothing more than a pointer.  For example,
> > if we have the following code:
>
> Not true.  Or rather, only partially true.
> In a variable declaration the two are *not* equivalent.  In a parameter
> declaration and in an expression, the two *are* equivalent.

Not in all expressions.
sizeof(array) is usually not sizeof(&array[0])

See me trim.

-- 
Mike   hennebry@web.cs.ndsu.NoDak.edu
"I AM DEATH, NOT TAXES.  *I* ONLY TURN UP ONCE."  --  Death

-- 
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic