What are the differences between an array of char pointers and a 2D array?

前端 未结 4 1106
一向
一向 2021-01-06 18:38

What are the differences between an array of char pointers and a 2D array?

4条回答
  •  情歌与酒
    2021-01-06 19:18

    You can access elements with the same syntax, but the guarantees about memory layout is much different. The 2d array is contiguous. The array of pointers is not.

提交回复
热议问题