In C, are arrays pointers or used as pointers?

前端 未结 6 1028
野趣味
野趣味 2020-11-22 05:23

My understanding was that arrays were simply constant pointers to a sequence of values, and when you declared an array in C, you were declaring a pointer and allocating spac

6条回答
  •  遇见更好的自我
    2020-11-22 05:51

    In addition to what the others said, perhaps this article helps: http://en.wikipedia.org/wiki/C_%28programming_language%29#Array-pointer_interchangeability

提交回复
热议问题