title: Scanning white space with fgets()
body: <p>I'm running user input through a series of functions provided by the ctype.h library, but scanf doesn't work for white space.</p>
  
  <p>Since I can't use scanf for whitespace I believe fgets() should be what I'm looking for, but am unsure about the last parameter I would use for it. Any advice would be appreciated!</p>
  
  <pre><code>#include &lt;stdio.h&gt;
  #include &lt;ctype.h&gt;
  
  int main(void) {
    char a;
  
    puts("Enter a character:");
  
    //scanf("%s", &amp;a);
    fgets(a, 1, ??);
  
  
    printf("isblank('%c')  = %d \n", a ,isblank(a)); 
    printf("isdigit('%c')  = %d \n", a ,isdigit(a));
    printf("isalpha('%c')  = %d \n", a ,isalpha(a));
    printf("isalnum('%c')  = %d \n", a ,isalnum(a));
    printf("isxdigit('%c') = %d \n", a ,isxdigit(a));
    printf("islower('%c')  = %d \n", a ,islower(a));
    printf("isupper('%c')  = %d \n", a ,isupper(a));
    printf("tolower('%c')  = %d \n", a ,tolower(a));
    printf("toupper('%c')  = %d \n", a ,toupper(a));
    printf("isspace('%c')  = %d \n", a ,isspace(a));
    printf("iscntrl('%c')  = %d \n", a ,iscntrl(a));
    printf("ispunct('%c')  = %d \n", a ,ispunct(a));
    printf("isprint('%c')  = %d \n", a ,isprint(a));
    printf("isgraph('%c')  = %d \n", a ,isgraph(a));
  
    return 0;
  }
  </code></pre>
  
  <p>Output should look like this </p>
  
  <pre><code>Enter a character:
   C
  isblank('C')  = 0 
  isdigit('C')  = 0 
  isalpha('C')  = 1024 
  isalnum('C')  = 8 
  isxdigit('C') = 4096 
  islower('C')  = 0 
  isupper('C')  = 256 
  tolower('C')  = 99 
  toupper('C')  = 67 
  isspace('C')  = 0 
  iscntrl('C')  = 0 
  ispunct('C')  = 0 
  isprint('C')  = 16384 
  isgraph('C')  = 32768
  </code></pre>
  
  <p>Program should intake a single character and convert it to integer through a series of functions.</p>