home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!math.fu-berlin.de!mailgzrz.TU-Berlin.DE!cs.tu-berlin.de!jutta
- From: jutta@opal.cs.tu-berlin.de (Jutta Degener)
- Subject: Re: const char *p == char const *p ?
- Message-ID: <1992Nov16.010820.26757@cs.tu-berlin.de>
- Sender: news@cs.tu-berlin.de
- Organization: Techn. University of Berlin, Germany
- References: <1992Nov15.162912.17454@news.uiowa.edu>
- Date: Mon, 16 Nov 1992 01:08:20 GMT
- Lines: 18
-
- bonak@herky.cs.uiowa.edu (Esmail Bonakdarian) writes:
- > Is "char const *p" equivalent to "const char *p"?
-
- Yes. They are both pointers to constant character; you may
- change the pointer, but not the character it points to.
-
- Some programmers prefer "char const *" to "const char *".
- They argue that C declarations are read "inside out":
-
- char const * p ;
- ^ p is a
- ^ pointer to
- ^^^^^ constant
- ^^^^ char
-
- But that's just a matter of style.
-
- Jutta
-