Re: another const question

Discussion in 'C Programming' started by bd, Jun 29, 2003.

  1. bd

    bd Guest

    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.
    bd, Jun 29, 2003
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    11
    Views:
    1,089
  2. Javier
    Replies:
    2
    Views:
    545
    James Kanze
    Sep 4, 2007
  3. 0m
    Replies:
    26
    Views:
    1,093
    Tim Rentsch
    Nov 10, 2008
  4. fungus
    Replies:
    13
    Views:
    873
    fungus
    Oct 31, 2008
  5. Replies:
    2
    Views:
    529
    Andrew Koenig
    Feb 9, 2009
Loading...

Share This Page