title: C - format specifies type int but the argument has type long
body: <p>I cannot find how to fix this exercise: it's about learning character counting (I'm using the Kernighan-Ritchie edition). My issues bar says:</p>
  <blockquote>
  <pre><code>warning: format specifies type 'int' but the argument has type 'long' [-Wformat]
      printf(&quot;%1d\n&quot;, nc);
              ^  %1ld
  </code></pre>
  </blockquote>
  <p>This is the code:</p>
  <pre><code>#include &lt;stdio.h&gt;
  
  int main()
  {
      long nc;
  
      nc = 0;
      while (getchar() != EOF)
          ++nc;
      printf(&quot;%1d\n&quot;, nc);
  }
  </code></pre>
  <p>I use Qt Creator 3.1.1 on a Mac. Same issue on Xcode Version 6.2 (6C131e).</p>
  <p>Any help? Thanks in advance.</p>