title: Does using index brackets for a pointer dereference it?
body: <p>Does using index brackets for a pointer also dereference it? And why does printing the 0th index of this pointer twice end up printing two different things?</p>
  
  <pre><code>#include &lt;cstdlib&gt;
  #include &lt;iostream&gt;
  #include &lt;cstring&gt;
  
  using namespace std;
  
  int *p;
  
  void fn() {
      int num[1];
      num[0]=99;
      p = num;
  }
  
  int main() {
      fn();
      cout &lt;&lt; p[0] &lt;&lt; "  " &lt;&lt; p[0];
  }
  </code></pre>