So I'm learning C, and I would like to ask whether my statements are correct or not.
Array names are converted to pointers except two cases: at the use of sizeof or & operators
The array name is a pointer to the first element of the array, so for example
int array[10]; int* pointer = array; // int* pointer = &array[0]; is the same
Here are two arrays and some expressions (use as lvalue expressions). I'm interested the expressions return type is correct or not?
int B[2][3];
3. &B[0] type is int (*)[3]
4. &B type is int (*)[2][3]
5. sizeof(B) here B type is int[2][3]
6. B+1 type is int (*)[3]
7. *(B+1) type is int[3] // 8. here th type int[3] and int* is not the same right?
8. *(B+1) + 2 type is int*
9. *(*B+1) type is int
10. &(*B+1) type is int (**)[3]
11. **B type is int
int c[3][2][5];
12. &c[0] type is int (*)[2][5]
13. *c type is int[2][5]
14. *(*c+1) type is int[5]
15. &*c type is int (*)[2][5]
16. &**c type is int (*)[5]
I would really appreciate if you would correct if I'm wrong.