home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!news.uiowa.edu!herky.cs.uiowa.edu!bonak
- From: bonak@herky.cs.uiowa.edu (Esmail Bonakdarian)
- Subject: const char *p == char const *p ?
- Message-ID: <1992Nov15.162912.17454@news.uiowa.edu>
- Sender: news@news.uiowa.edu (News)
- Date: Sun, 15 Nov 1992 16:29:12 GMT
- Reply-To: bonak@herky.cs.uiowa.edu (Esmail Bonakdarian)
- Nntp-Posting-Host: herky.cs.uiowa.edu
- Organization: U of Iowa, Iowa City, IA
- Lines: 22
-
- I looked in the faq file but didn't find the answer for this exact question.
-
- MY QUESTION IS:
-
- char const *p
-
- equivalent to
-
- const char *p ?
-
-
- I.e, both pointers can be modified, but can not modify the contents at
- the location they are pointing to (correct?)
-
- I understand that
- char *const p
- is a constant pointer, i.e., the pointer can not be modified, but
- the contents of the location it is pointing to can.
-
- Thanks for clearing up my question
-
- Esmail
-