Question: I thought array and pointer are basically the same thing, until I run this program:

```
int main() {
  int* a = new int(19);
  int b[1];
  b[0] = 19;

  printf("*a: %d\n a: %p\n &a:%p\n", *a, a, &a);
  printf("*b: %d\n b: %p\n &b:%p\n", *b, b, &b);
  delete a;
}

```

output is:

```
*a: 19
 a: 0x7f94524000e0
 &a:0x7fff51b71ab8
*b: 19
 b: 0x7fff51b71ab4
 &b:0x7fff51b71ab4

```

can someone please explain why the output of &b is the same as b?

Thanks!
-Erben

Answer: 
Well, `b` is an array. Under the slightest excuse it will decay into a pointer to the first element of `b`. Note, however, that the expression `b` and `&b` are *not* equivalent: `b` decays into a pointer the first element, i.e., it is of type `int*` while `&b` is a pointer to the array, i.e., it is of type `int(*)[1]`.
`a` is a variable. You are allocating memory using `new` and assigning the result to this pointer. You might decide to store something else in `a` later in your program.

`b` is different. It's not a variable in the sense that it cannot store different addresses. It's an array, having a fixed start location. 

Thus, `b` and `&b` are same. But the contents of `a` and the actual address of `a` are different.