a.out < file1 (stdin comes from file1) a.out > file2 (stdout goes to file2) a.out < file1 > file2
Try this with any program you have which reads or prints data.