Purpose of fflush()
The C library function int fflush(FILE *stream)
flushes the output buffer of a stream.
Understanding fsync in Relation to fflush()
The fsync call is very expensive, but it is essential to databases as it allows for durability (the "D" of the ACID acronym).
Calling fsync from fflush
No, calling fflush on a POSIX system does not imply that fsync will be called.
Meaning of x -= y + 1 in C
In C programming language x -= y + 1; means:
- x = x – y + 1
- x = -x – y – 1
Purpose of fflush() Function
Explanation: "fflush()" flushes any buffered output associated with filename, which is either a file opened for writing or a shell command for redirecting output to a pipe or coprocess.