Can I cast an an array of arrays int arr[4][10] to an array of pointers int *arr[4]?
How should I write the cast?
Can I cast an an array of arrays int arr[4][10] to an array of pointers int *arr[4]?
No.
You can cast int arr[4][10] to int (*arr)[10] though — or rather the former is implicitly convertible to the latter that you don't require any explicit cast at all.
BTW, it is better if you avoid using raw arrays to begin with. Prefer std::array<T,N> instead.
In this case, you could use std::array<std::array<int,10>,4>.. and then try designing your code in such a way which doesn't require casting at all.
arr to a pointer to an array of size 10 (basically &arr[0]). Is that right?arr[i] is int[10], &arr[i] is int(*)[10], not int*[10] or int*[4]arr as an expression value is already an int (*)[10]. The syntax &arr[0] is not needed, nor is it needed for any of the other indices, which can be obtained with simply arr + n, each of them int (*)[10]int[4][10] to int *[4]; a reinterpret_cast will do that nicely. You can't do anything with the results of the cast except to cast it back, of course---it doesn't miraculously change the layout of what is pointed to in memory. But the cast itself is legal and well defined.