What is the difference between char array and char pointer in C?

后端 未结 8 545
醉话见心
醉话见心 2020-11-22 06:03

I am trying to understand pointers in C but I am currently confused with the following:

  • char *p = \"hello\"
    

    This is a char pointer

8条回答
  •  渐次进展
    2020-11-22 06:11

    As far as I can remember, an array is actually a group of pointers. For example

    p[1]== *(&p+1)
    

    is a true statement

提交回复
热议问题