When is pointer to array useful?

前端 未结 9 1825
天涯浪人
天涯浪人 2020-12-30 09:18

I can declare:

int (*ap)[N];

So ap is pointer to int array of size N. Why is this ever useful? If I pass it to function, what usefu

9条回答
  •  时光取名叫无心
    2020-12-30 09:42

    If you increment the pointer, it will then point to the start of the next group of N elements.

    This is not a big deal and it's use is up to the developer.

提交回复
热议问题