#include // pipe #include int main(int argc, char* argv[]) { int filedes[2]; if (pipe(filedes) < 0) { perror("pipe"); return 1; } char buf = 'a'; write(filedes[0], &buf, 1); char bufin; read(filedes[1], &bufin, 1); printf("%c\n", bufin); }