Msmset
1 /* sets the first count bytes of the memory area in buffer to character C and returns a pointer to buffer */ 2 #include <string.h>3externvoid *meeset (void * Buffer,int c,int count);
Gets
1 /* Gets the string function read from the standard input device. Can be read indefinitely without judging the upper limit to return to the end of the read, so the programmer should ensure that buffer space is large enough so that no overflow occurs while the read operation is performed. */2 #include <stdio.h>3charChar * str);
Fgets
1 /*reads data from the file structure pointer stream, reading one row at a time. 2 The data read is stored in the character array pointed to by BUF,3 reads up to bufsize-1 characters at a time (bufsize assigned ' + '),4 if the line in the file is less than bufsize characters, the line finishes reading. 5 If the number of characters in the line (including the last newline character) exceeds bufsize-1,6 the Fgets returns only an incomplete row, but the buffer always ends with a null character,7 The next call to Fgets will continue to read the row. The function succeeds in returning BUF, failing or reading to the end of the file, returning null. 8 Therefore, we cannot judge whether a function is terminated by an error directly through the return value of fgets, and should be judged by feof function or Ferror function. */9 Ten Char*fgets (Char*buf,intBufSize, FILE *stream); One A /* - *buf: A character pointer that points to the address used to store the resulting data. - bufsize: Integer data indicating the size of the stored data. the *stream: File structure pointer, the file stream that will be read. - */
Benevolent training Camp March 11