Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(int argc, const char * argv[]) {
- int c;
- if (argc > 1) {
- if (freopen(argv[1], "r", stdin) == NULL) {
- perror(argv[1]);
- return 1;
- }
- }
- while ((c = getchar()) != EOF && putchar(c))
- ;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement