Copy stdin to stdout: Difference between revisions

C
(Fix section ordering after edit conflict)
(C)
Line 2:
 
Create an executable file that copies stdin to stdout, or else a script that does so through the invocation of an interpreter at the command line.
 
=={{Header|C}}==
<lang C>
#include <stdio.h>
 
int main(){
char c;
while ( (c=getchar()) != EOF ){
putchar(c);
}
return 0;
}
</lang>
 
=={{Header|Perl}}==
Anonymous user