title: scanf not working when reading float
body: <p>I have the following code:</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  
  float a;            //Initialize variables
  char b;
  int c;
  char d;
  
  int main(void)
  {
      printf("Enter float: ");
      scanf("%4.2f", &amp;a);
  
      printf("%4.2f", a);
  
      //printf("Enter character:\n");
  
      //printf("Enter 4-digit integer: \n");
  
      //printf("Enter character:\n");
  
      return 0;
  }
  </code></pre>
  
  <p>However I get the following errors when compiling:</p>
  
  <blockquote>
    <p>1.) <code>scanf</code>:unknown field type character '.' in format specifier</p>
    
    <p>2.) <code>scanf</code>: too many arguments passed for format string</p>
  </blockquote>
  
  <p>Can anyone explain what the issue in my code is?  </p>
  
  <p>Thank you!</p>