+ 2
What is array pointer and pointer array in c ?đ€
Ex int (*arr)[10] Int *arr[10] What is the difference between them plse explain with example
1 Answer
+ 1
int *arr[10] is an array of int pointers.and int (*arr)[10]is a pointer to an array of integers.
int *arr[10] contains 10 int pointers, to 10 int, for example to 10 int variables from an other array.
int (*arr)[10] is the same as int *arr = &arr2 with arr2=arr2[10] (you just have the variable arr2 in the second possibility too).