-3

what kind of declaration is this in C and C++?

int (*array1)[10]

Also, after resolving this, since it is some kind of array, how to access those members?
If this is a function, which returns a pointer to an array of 10, pointer, than is it possible to declare it without parenthesis? What arguments does it take?

EDIT:
As you answered it is pointer to an array of 10 integers, what is the difference between these two?

int (*array1)[10]
int array1[10]

EDIT:
How to assign that pointer? I try

int array[10] __attribute__((used)) = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9};
int (*array_ptr)[10] = array;

And it give error:

cannot convert 'int*' to 'int (*)[10]' in initialization

1 Answers1

0

it is a declaration of array1 as pointer to array 10 of int.

Access to it`s member is as usual, array1[0], array1[1] ...