codescracker


c

C fputs()



« Previous Function Next Function »


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

#include<stdio.h>
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);

« Previous Function Next Function »



Tools
Calculator

Quick Links
Signup - Login - Give Online Test