title: Confused about GCC and scanf in C
body: <p>I am using GCC to compile my C code.
  My second <code>scanf</code> is not stopping to get the input.
  It only reads in the first <code>scanf</code> and prints the two statements, one with what I entered in string and the other is just blank.</p>
  
  <pre><code>int main (void) {
      setvbuf(stdout, NULL, _IONBF, 0);
  
      char string[25] = {'\0'};
      char c;
  
      scanf(" %s", string);  
  
      scanf(" o%c", &amp;out);
  
      printf("Input is : %s \n\n", string);
      printf("Out is: %c", out);
  
      return 0;
  }
  </code></pre>
  
  <p>Instead of getting</p>
  
  <p>Input is  whatever I typed and a prompt to enter a char for out</p>
  
  <p>I got output as shown below</p>
  
  <pre><code>Input is : whatever i typed
  Out is:
  </code></pre>
  
  <p>The program terminates. Can someone help. I've done some research and tried to put a space before <code>%c</code> for out and for string and still nothing happened.</p>