Download Ultra C Library Reference
Transcript
gets() Get String from File Syntax #include <stdio.h> char *gets(char *str); Description gets() reads characters from the standard input file into an array until end-of-file is encountered or a newline character is read. Any newline character is discarded, and a null character is written immediately after the last character read into the array. str is a pointer to the array. gets() returns str if successful. If end-of-file is encountered and no characters have been read into the array, the contents of the array remain unchanged and a null pointer is returned. If a read error occurs during the operation, the array contents are indeterminate and a null pointer is returned. Attributes Operating System: State: Threads: Re-entrant: Standards: OS-9 and OS-9 for 68K User and System Safe No ANSI Library clib.l See Also fgets() Ultra C Library Reference 331