fputc, fputwc

De RAD Studio
Aller à : navigation, rechercher

Remonter à Stdio.h - Index


Header File

stdio.h

Category

Input/output Routines

Prototype

int fputc(int c, FILE *stream);

wint_t fputwc(wint_t c, FILE *stream);

Description

Puts a character on a stream.

fputc outputs character c to the named stream.

Remarque :  For Win32 GUI applications, stdin must be redirected.

Return Value

On success, fputc returns the character c. On error, it returns EOF.

Example



 #include <stdio.h>
 int main(void)
 {
    char msg[] = "Hello world";
    int i = 0;
    while (msg[i])
    {
       fputc(msg[i], stdout);
       i++;
    }
    return 0;
 }



Portability



POSIX Win32 ANSI C ANSI C++

fputc

+

+

+

+

fputwc

+

+

+