what different between fflush(FILE* stream) and fflush(NULL) at c? I know that fflush(NULL) flush all the stream what is fflush(FILE* stream) do?
Asked
Active
Viewed 497 times
-4
-
One of its uses: `fflush(stdout);` – Ardent Coder May 24 '20 at 12:46
-
Flush one specific stream, or flush all output streams. See e.g. [this `fflush` reference](https://en.cppreference.com/w/c/io/fflush) – Some programmer dude May 24 '20 at 12:48
-
If you know that `fflush(NULL)` flushes all the streams then how come you don't know that `fflush(FILE* stream)` flushes the given stream? – Ayush Oct 13 '22 at 05:08
-
`fflush(FILE* stream)` forward declares `fflush` as a function accepting a `FILE*` – user16217248 Apr 06 '23 at 21:36
1 Answers
0
You can get the details from “man fflush”(“fflush() forces a write of all user-space buffered data for the given output or update stream via the stream's underlying write function ”from man )

TBFire
- 1
- 2