title: Uninitialized char variable
body: <p>When compiling my code below, it says that <code>f</code> is uninitialized. How do I initialize a character and why do I need to? My intention is to end the loop when <code>f</code> is entered and stored in <code>c</code>.</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;string.h&gt;
  int main(void)
  {
    int count= 0;
    char c,f;
  
    printf("Input a character:\n");
    do
    {
      c = getchar();
      count++
    }while(c!=f);
    printf("number of characters: %d", count);
    return 0;
  }
  </code></pre>