Consider the following code:

int a = 5;
cout << a << " " << &a;

Obviously "a" prints out 5 and &a prints out the address of a. Now this code:

int * b = new int[2];
cout << b << " " << &b;

I get 2 different memory addresses as expected. However, if I do this:

int c[] = {5,6,7};
cout << c << " " << &c;

I get the exact same memory location. Why are c and &c the exact same address? I'm assuming it has something to do with the static allocation of c and the dynamic allocation of b. Any ideas?