Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>fputchar() write a character to a stdout</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 fputchar()              Write a Character to a Stdout

 #include   <stdio.h>

 int fputchar(c);
 int        c;                           Character to be written

        This function is the same as putc(), except that it outputs a
        character to stdout automatically.

       Returns:     The character written, if successful.  EOF is
                    returned to indicate an error.  Since EOF is a
                    legitimate integer value, use ferror() to verify an
                    error condition.

   -------------------------------- Example ---------------------------------

 #include <stdio.h>

 int main(void)

    char msg[] = "Hello world!";
    int j = 0;

    while (msg[j])
    {
       fputchar(msg[j]);
       j++;
    }
    return 0;


See Also: fgetchar()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson