GNU C Library: fputc
상위: GNU C 라이브러리
#include <stdio.h>
int fputc(int c, FILE *stream) 자세한 설명 ¶인자
c 를 unsigned char 로 변환하고, 이것을 스트림 stream 으로 출력한다.
쓰기 에러가 발생하면 EOF 를 리턴한다. 그렇지 않으면 인자로 준 c 를 리턴한다.
예제 ¶
#include <stdio.h>
int main(void) { char hello[] = "Hello, world!\n"; char *p; for (p = hello; *p != '\0'; p++) { fputc(*p, stdout); } return 0; } |
Let a fool hold his tongue and he will pass for a sage. |