#include
int fscanf(FILE *stream, const char *format, ... );
pass a FILE pointer as the first argument of fscanf. The second argument is like the first argument of scanf i.e. a string containing format specifiers. Then follows a list variable addresses so that you can store the inputted data.
#include
char * fgets ( char * str, int num, FILE * stream );
Reads characters from stream and stores them as a C string into str until (num-1) characters have been read or either a newline or a the End-of-File is reached
沒有留言:
張貼留言