title: fflush() is not working in Linux
body: <p>I used the fflush() in Linux GCC but it did not work. Are there any alternatives for that function? Here is my code:</p>
  
  <pre><code>#include&lt;stdio.h&gt;
  void main()
  {
    char ch='y';
    while(ch=='y')
    {
      int a;
      printf("Enter some value:");
      scanf("%d",&amp;a);
      fflush(stdin);
      printf("Do you want to continue?");
      scanf("%c",&amp;ch)
    }
  </code></pre>
  
  <p>The output that I got is:</p>
  
  <pre><code>Enter some value: 10
  </code></pre>
  
  <p>Then the program ends. That's all. What can I do in Linux? Is there an alternative function?</p>