title: C string output to null
body: <p>So I have this code here to take three input from the user, one integer type and 2 character types:</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  int main() {
  
      int carNumber;
      char customerName, carCode;
  
      printf(&quot;Enter Car Number: &quot;);
      scanf(&quot;%d&quot;, &amp;carNumber);
      printf(&quot;Enter Customer Name: &quot;);
      scanf(&quot;%s&quot;, &amp;customerName);
      printf(&quot;Enter Car Code: &quot;);
      scanf(&quot;%s&quot;, &amp;carCode);
  
      if (carCode == 'T'){
          printf(&quot;Toyota&quot;);
      }
      else if (carCode == 'H'){
          printf(&quot;Honda&quot;);
      }
  
      printf(&quot;\nCar Number: %d&quot;, carNumber);
      printf(&quot;\nCustomer Name: %s&quot;, customerName);
      return 0;
  
  }
  </code></pre>
  <p>While most of it outputs correct,  the <code>customerName</code> always prints <code>(null)</code>.</p>