What is the difference between the following declarations in C?

后端 未结 4 1643
孤街浪徒
孤街浪徒 2021-01-15 06:44

what\'s the difference between these 2 declarations:

char (*ptr)[N];

vs.

char ptr[][N];

thanks.

4条回答
  •  长情又很酷
    2021-01-15 06:59

    First is declare ptr as pointer to array N of char
    Second is declare ptr as array of array N of char

    Plz refer link

提交回复
热议问题