S
subramanian100in
int ferror(FILE *stream)
The function ferror tests the error indicator for the stream pointed
to by stream, returning non-zero if it is set.
Under what circumstances error indicator will be set. How to generate
those error conditions so that the code inside
if (ferror(stream))
{
// ... I should be able to test the code here
}
can be tested. I do not know how to create these error scenarios so
that the error indicator for the stream is set.
Kindly clarify.
Thanks
V.Subramanian
The function ferror tests the error indicator for the stream pointed
to by stream, returning non-zero if it is set.
Under what circumstances error indicator will be set. How to generate
those error conditions so that the code inside
if (ferror(stream))
{
// ... I should be able to test the code here
}
can be tested. I do not know how to create these error scenarios so
that the error indicator for the stream is set.
Kindly clarify.
Thanks
V.Subramanian