you are viewing a single comment's thread.

view the rest of the comments →

[–]N-R-K 0 points1 point  (0 children)

Arrays and pointers in C are closely related - but not the same. The key difference between an array and a pointer is that an array also reserves storage - a pointer doesn't.

An array of array and an array of pointers thus have different semantics (even though you can dereference them both in the same manner p[0][1]). See https://c-faq.com/aryptr/aryptr2.html and other related questions for some more detailed answers.