title: Difference of a char array in C and C++
body: <p>I am converting a large code base form C to C++. I got a compiler error for the following line of code:</p>
  <pre><code>char SingleDigit[2] = {&quot; \n&quot;};
  </code></pre>
  <blockquote>
  <p>error: a value of type &quot;const char [3]&quot; cannot be used to initialize
  an entity of type &quot;char [2]&quot;</p>
  </blockquote>
  <p><code>&quot; \n&quot;</code> has just one whitespace.</p>
  <p>Has the initialization of a char array changed for <code>C</code> to <code>C++</code>? Is <code>&quot; &quot;</code> (with one space) actually a char array of length to (null termination).</p>
  <p>Was this a bug in <code>C</code> already?</p>
  <p>I use the Intel compiler version  19.1.1.216 and Windows 10 for the <code>C</code> and the <code>C++</code> code.</p>