codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include<stdio.h> #include<conio.h> void transFile(FILE* inFile, FILE* outFile) { int ch; while(1) { ch = fgetc(inFile); if(!feof(inFile)) { fputc(ch, outFile); } else break; } } void main() { FILE *fpIn; char* fname = "Data.txt"; fpIn = fopen(fname,"rt"); if(fpIn == NULL) { printf("FIle %s not found\n", fname); } transFile(fpIn, stdout); fclose(fpIn); getch(); }
Private
[
?
]
Run code
Submit