Checks if the error indicator associated with stream is set, returning a value different from zero if it is.
Syntax:int ferror ( FILE * stream );
Example:#include
int main ()
{
FILE * pFile;
pFile=fopen("myfile.txt","r");
if (pFile==NULL) perror ("Error opening file");
else {
fputc ('x',pFile);
if (ferror (pFile))
printf ("Error Writing to myfile.txt\n");
fclose (pFile);
}
return 0;
}
License.
All information of this service is derived from the free sources and is provided solely in the form of quotations.
This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 508 / 159132356. Delta: 0.00133 с