RAD Studio |  |

_fputchar, _fputwchar

Header File

stdio.h

Category

Input/output Routines

Prototype

int _fputchar(int c);

wint_t _fputwchar(wint_t c);

Description

Outputs a character to stdout.

_fputchar outputs character c to stdout. _fputchar(c) is the same as fputc(cstdout).

Note: For Win32 GUI applications, stdout must be redirected.
Return Value

On success _fputchar returns the character c.

On error it returns EOF.

Example

Copy Code

    #include <stdio.h>
    int main(void)
    {
       char msg[] = "This is a test";
       int i = 0;
       while (msg[i])
       {
          fputchar(msg[i]);
          i++;
       }
       return 0;
    }

Portability

| POSIX | Win32 | ANSI C | ANSI C++
_fputchar |  | + |  |
_fputwchar |  | + |  |

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!