· KLDP.org · KLDP.net · KLDP Wiki · KLDP BBS ·
GNU C Library: fputc



#include <stdio.h>

int fputc(int c, FILE *stream)

요약

문자를 스트림으로 출력


리턴 값

쓰기 에러가 발생하면 EOF를 리턴한다. 그렇지 않으면 인자로 준 c를 리턴한다.


자세한 설명

인자 cunsigned char로 변환하고, 이것을 스트림 stream으로 출력한다. 쓰기 에러가 발생하면 EOF를 리턴한다. 그렇지 않으면 인자로 준 c를 리턴한다.


호환성

ANSI - C, POSIX.1


예제

#include <stdio.h>

int main(void)
{
    char hello[] = "Hello, world!\n";
    char *p;
    for (p = hello; *p != '\0'; p++) {
        fputc(*p, stdout);
    }
    return 0;
}


SEE ALSO

putc, putchar, fputs, puts

ID
Password
Join
Let a fool hold his tongue and he will pass for a sage.


sponsored by andamiro
sponsored by cdnetworks
sponsored by HP

Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-05-13 16:47:37
Processing time 0.0039 sec