FILE* file_1 = fopen(.......);
FILE* file_2 = fopen(.......);
fgets(str, sizeof(str), stdin);
fgets(str, sizeof(str), file_1);
fputs(str, stdout);
fputs(str, file_2);
fprintf(stdout, ......);
fprintf(stderr, ......);
myprogram > output.txt
myprogram 2> err.txt
myprogram > output.txt 2> err.txt
|
Simply, '|'
Connecting multiple program procedures' stdout and stdin like a waterfall, like ONE stream.
Than prints the result
Program_A | Program_B