title: Is C++ Array passed by reference or by pointer?
body: <p>In school, our lecturer taught us that the entire array was passed by <strong>reference</strong> when we pass it to a function,.</p>
  
  <p>However, recently I read a book. It says that arrays are passed by <strong>pointer</strong> by default when passing the entire array to a function. The book further mention that "<em>passing by pointer is very similar to passing by reference</em>", which means that passing by pointer and passing by reference are actually different.</p>
  
  <p>It appears that different source stated differently.</p>
  
  <p><strong>So my question is:</strong> In C++, are arrays passed by reference or by pointer when we pass the <strong>entire array</strong> to a function?</p>
  
  <p>For Example:</p>
  
  <pre><code>void funcA(int []); //Function Declaration
  
  int main()
  {
      int array[5];
      funcA(array); //Is array passed by ref or by pointer here?
  }
  </code></pre>