As we studied the arrays, 2 questions arose:
one.
#include <iostream> using std::cout; using std::cin; int main (void) { setlocale(LC_ALL, "ru"); int a[5]; cout << a << "\n" << &a << "\n"; system("pause"); } Why is the same address printed? How to read, а - a pointer to the first element of the array. We print the address of this first element, and then the address of the pointer to it, but the address is the same. Can you clarify the situation?
2. Record
int a[5] and
int (*a)[5] What does the second example mean, how to work with it (with the help of new) and what is its difference from the first one.