title: C++ pointer assigning char array's address
body: <p>In many examples I see, if <code>int x = 0; int *ptr; ptr = &amp;x</code> then ptr is saving x's address info. I'm kinda confused why if the following code does perform the same. When I print the <code>ptr</code>, it shows: </p>
  
  <blockquote>
    <p>app</p>
  </blockquote>
  
  <p>rather than the address of the p[0]. </p>
  
  <pre><code>#include &lt;iostream&gt;
  #define show(a)     std::cout&lt;&lt;a&lt;&lt;std::endl;
  #define Syswait     std::system("pause");
  
  int main() {
  
  
  char p[] = "app";
  char *ptr;
  ptr = &amp;p[0];
  show(ptr);
  
  Syswait;
  }
  </code></pre>
  
  <p>Can anyone explain? Thanks.</p>