Skip to content

ferror : test whether read/write error has occurred

#include <stdio.h>
int ferror(FILE *fp);
```### Description
The stdio functions maintain an error indicator with each file pointer fp, to record whether any read or write errors have occurred on the associated file or stream. Use ferror to query this indicator.
See clearerr to reset the error indicator.### Returns
ferror returns 0 if no errors have occurred; it returns a nonzero value otherwise.
---
**Authoritative source**: BUSMASTER DITA help source `ferror.dita`, compiled into `BUSMASTER.CHM` with the application.