Today I find the following piece of code
void func(int A[const 10]) { ... }
By compiling it using gcc, I conclude that int A[const]
is equivalent to int* const A
instead of const int *A
. I wonder why here: const
is inside the brackets, why does it not modify elements of A
but A
itself?