+ 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

1st Feb 2019, 1:28 PM
Programmer Raja
Programmer Raja - avatar
1 Resposta
+ 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).
1st Feb 2019, 10:59 PM
Niwo
Niwo - avatar