Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Re: another const question

Thread Tools

Re: another const question

Posts: n/a
On Sun, 29 Jun 2003 10:48:03 -0700, Felix Zaslavskiy wrote:

> given :
> char c[] = "hello";
> Can one say that c is type of const char * ?
> I know this kind of statement may apply to c++ only but can one state
> this for C in a practical sence ?

Nope. c is an array of type char. It is not const, and is not a pointer
(though it can be converted into a pointer to its first element).
Freenet distribution not available
Don't expect people to keep in step--it's hard enough just staying in line.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
const vector<const MyType> Vs const vector<MyType> C++ 2 02-09-2009 10:45 PM
is const necessary in eg int compar(const void *, const void *) lovecreatesbeauty@gmail.c0m C Programming 26 11-10-2008 09:47 PM
const correctness - should C++ prefer const member over non-const? fungus C++ 13 10-31-2008 05:33 AM
const vector<A> vs vector<const A> vs const vector<const A> Javier C++ 2 09-04-2007 08:46 PM
Casting int'** to 'const int * const * const' dosn't work, why? C Programming 11 07-01-2007 06:16 PM