title: C - scanf() print() in gitbash and windows cmd
body: <p>I am doing a simple C program that accepts input and display some number.</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  #include&lt;conio.h&gt;
  
  int main()
  {
      // setvbuf(stdout, NULL, _IONBF, 0);
      int a, b, c;
      printf("Enter two values: \n");
      scanf("%d %d", &amp;a, &amp;b);
      c = a + b;
      printf("Total answer is %d", c);
      return 0;
  }
  </code></pre>
  
  <p>I am using gcc as compiler.</p>
  
  <p>So the process is there is a text that asks for input, then input two numbers and display the result.</p>
  
  <p>Now, if I compile and run my code in windows cmd, It works perfectly. No problem at all.</p>
  
  <p>But, if I compile and run using git bash, it asks first for numbers before displaying the prompt that asks for number. It is like it runs the scanf() first before the first printf() function.</p>
  
  <p>Do you know why? I am just curious why it gives different result.</p>