const usage with pointers in C

后端 未结 6 1902
夕颜
夕颜 2020-11-28 10:32

I am going over C and have a question regarding const usage with pointers. I understand the following code:

const char *someArray
6条回答
  •  清酒与你
    2020-11-28 11:11

    From what is the difference between const int*, const int * const, int const *:

    Read it backwards...

    int* - pointer to int
    int const * - pointer to const int
    int * const - const pointer to int
    int const * const - const pointer to const int
    

提交回复
热议问题