#include #include #include int main(int argc, char* argv[]){ int t[2]; char p; int nbchar = 0; pipe(t); while (write(t[1],&p,sizeof(char)) > 0){ nbchar ++; printf("%d\n",nbchar); } close(t[0]); close(t[1]); return 0; }