Character I/O
`getchar`, `putchar`, `getc`, `putc`, `fgetc`, `fputc` read and write single characters.
Beginner
int c; while ((c = getchar()) != EOF) putchar(c); — store in an int, not char, so EOF can be detected.
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.