programming:c:function fgetsWhat links here?

Syntax

char *fgets(char *str, int num, FILE *stream);


Get string from 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, whichever comes first. A newline character makes fgets stop reading, but it is considered a valid character and therefore it is included in the string copied to str. A null character is automatically appended in str after the characters read to signal the end of the C string.



Parameters



Return Value

On success, the function returns the same str parameter.

If the End-of-File is encountered and no characters have been read, the contents of str remain unchanged and a null pointer is returned.

If an error occurs, a null pointer is returned.

Use either ferror or feof to check whether an error happened or the End-of-File was reached.
programming:c:function fgets
programming:c:function fstat
programming - C - function gmtime
programming - C - function feof
programming:c:function ispunct
programming - C - function mktime
programming - C - function fgetc
php_errors
programming - C - function time
programming - C - function fputc
programming - C - function gets
programming:c:function printf
programming - windows - CreateWindowEx
programming - sqlite3 - data types
programming - C - function strftime
programming - javascript - onsubmit
programming - pascal - function - concat
programming - sqlite3 - c interface - sqlite3_bind_int
filename:programming:c:function fgets
filename:programming%3Ac%3Afunction%20fgets
last edit:April 04 2009 20:17:28 (6453 days ago)
ct = 1796429701.000000 = December 05 2026 00:15:01
ft = 1238876248.000000 = April 04 2009 20:17:28
dt = 557553453.000000