fclose function
| Prototype | int fclose (FILE * Stream); |
| Purpose | To close a file stream. |
| Header File | #include <stdio.h> |
| Parameters |
| Stream | Pointer to an open FILE |
|
| Return Value | |
| Notes |
- All buffers associated with the FILE are flushed before the stream is flushed.
|
| Example |
#include
#include
. . .
FILE * Account_Master;
int Status;
. . .
Status = fclose (Account_Master);
if (Status == 0)
printf ("File was successfully closed");
else
printf ("Function fclose failed.");
} |
| Related functions |
|