Array As pointer

#include
using namespace std;
int main()
{
int a[10];
cout<<&a<<endl;
cout<<a;
}

Why does line 2 and line 3 give the same output . According to me a gives us the address of first index, while &a should give us address of pointer a.

hello @nishchay-verma

this will happen if u allocate memory dynamically.
becuase there u will have seprate pointer for storing base address and then block of memory as array.
int *a=new int [n]
cout<<a
and &a will be different