0
What can be concluded form the following declaration? A)x is an array of 10 pointer. B)x is a pointer to an array of 10 integer?
int (*x)[10];
2 ответов
+ 1
x is a pointer to array of integers. Actually, when you write just int x[], x is pointer to first element in that array. When you do 'cout << x', it should print address of first element in array x. If you want to get second element, you can use x[1], but you can also use *(x+1). I just want to say that 'int x[]' and 'int (*x)[]' are the same.
0
thnkew buddy