The simplest Input-Output operations are performed at the character level using getchar() and putchar():
int getchar(void) |
int putchar(int) |
#include <stdio.h>
/* Copy standard input to standard output : */
main() {
int c;
c = getchar();
/* while not reached end-of-file on input : */
while (c != EOF) {
putchar(c); /* ignore possible errors */
c = getchar();
}
}
|
| ...previous | up (conts) | next... |