C fputs()

The fputs() function is used to write the contents of the string pointed to by str to the specified stream. Here the null terminator is not written

fputs() Syntax

int fputs(const char *str, FILE *stream);

The fputs() function returns non-negative on success, otherwise it will returns EOF on failures.

fputs() Example

Following c code writes string this is a test to the stream pointed to by fp

fputs("this is a test", fp);

C Online Test

« Previous Function Next Function »

Like/Share Us on Facebook 😋