In case fopen() is unsuccessfull in opening a file, it send s back a null(zero) value called NULL. NULL is defined in the file stdio.h.
For example, the following statement.
if((fp = fopen ("a.dat", "r")) == NULL)
can be used to test whether the file a.dat has been opened successfully or not.
0 comments:
Post a Comment