RAD Studio
ContentsIndex
PreviousUpNext
fputs, fputws

Header File 

stdio.h  

Category 

Input/output Routines 

Prototype 

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

int fputws(const wchar_t *s, FILE *stream); 

Description 

Outputs a string on a stream. 

fputs copies the null-terminated string s to the given output stream; it does not append a newline character and the terminating null character is not copied. 

Return Value 

On success fputs returns a non-negative value.  

On error it returns a value of EOF. 

Example  

#include <stdio.h>
int main(void)
{
   /* write a string to standard output */
   fputs("Hello world\n", stdout);
   return 0;
}

Portability

 
POSIX 
Win32 
ANSI C 
ANSI C++ 
fputs 
fputws 
 
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!