title: How would I only let the user input one character in c
body: <p>If I only want the user to enter one char, how would I go about doing that in the c language. My attempt at this is below but it failed horribly. From what i read online I heard you could use the function gets or fgets to accomplish this, but I could not figure out how. </p>
  
  <pre><code>do
  {
      geussNumber += 1;
      printf("Enter guess number %d\n", geussNumber);
      scanf(" %c", &amp;geussLetter);
      scanf ("%c", &amp;inputViolation);
          if (isalpha(geussLetter) == 0)
          {
              printf("You did not enter a letter\n");
          }
          else if (inputViolation == true)
          {
              printf("You eneterd more than one letter\n");
          }
          else
          {
          inputLoopEnd = 1;
          }
  }
  while( inputLoopEnd == false );
  </code></pre>