title: Difference between int fpurge() and int fflush() in C
body: <p>Can anyone please explain me about difference between <code>fpurge(FILE *stream)</code> and <code>fflush(FILE *stream)</code> in C?
  Both <code>fflush()</code> and <code>fpurge()</code> will discard any unwritten or unread data in the buffer.
  Please explain me  the exact difference between these two and also their pros and cons.</p>