title: Why is it possible to pass a double pointer (address of address) to scanf?
body: <p>This simple code is what I would expect:</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      char input[20];
      printf(&quot;enter a string: &quot;);
      scanf(&quot;%[^\n]s&quot;, input);
      printf(&quot;input: %s\n&quot;, input);
  }
  </code></pre>
  <p>where <code>input</code> is <code>(char*)[20]</code>. But then why can I pass this:</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      char input[20];
      printf(&quot;enter a string: &quot;);
      scanf(&quot;%[^\n]s&quot;, &amp;input);
      printf(&quot;input: %s\n&quot;, input);
  }
  </code></pre>
  <p>and it still compiles and runs? The argument <code>&amp;input</code> passed should be <code>(char**)[20]</code> which should not be correct, yet it runs. Why?</p>