Table of Contents        Previous topic       Next topic       

C COMPILER LIBRARY FUNCTIONS->Detailed Descriptions->fputs()


#include <stdio.h>

int fputs(const char* string, FILE* stream);Write a string to the output stream


stringPointer to the string to be written
streamPointer to FILE structure


This function writes the given string to the output stream writing a newline character ('\n) instead of the strings terminating null character ('\0').

Return Value

The return value is the last character written which is always a newline character.  A return value of EOF (-1) indicates an error.