title: Adding const keyword to an array passed as a parameter to function
body: <p>Is there any way that I can add <code>const</code> keyword to an array passed as a parameter to function:</p>
  
  <pre><code>void foo(char arr_arg[])
  </code></pre>
  
  <p>If I place <code>const</code> before <code>char</code> (<code>void foo(const char arr_arg[])</code>) or after <code>char</code>(<code>void foo(char const arr_arg[])</code>), that would mean than it's <code>char</code> which is constant, not the <code>arr_arg</code>.</p>
  
  <p>I have just <a href="http://eli.thegreenplace.net/2009/10/21/are-pointers-and-arrays-equivalent-in-c/" rel="noreferrer">read</a> that under the hood an array sent as a parameter to function is represented as a pointer, so <code>void foo(char arr_arg[])</code> is the same as <code>void foo(char* ptr_arg)</code>.
  Taking it into account, I may rewrite the function as <code>void foo(char * const ptr_arg)</code> for it to be exactly what I want to achieve.</p>
  
  <p>But I want to know if there is a way to add <code>const</code> keyword in this declaration <code>void foo(char arr_arg[])</code> for it to be the same as <code>void foo(char * const ptr_arg)</code> (and <strong>not</strong> <code>void foo(char const * ptr_arg)</code> or <code>void foo(const char * ptr_arg)</code>)?</p>
  
  <p>I just want to understand if there is a syntax to make <code>arr_arg</code> constant with array notation <code>[]</code>.</p>