| getputbin.c | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #include<stdio.h>
main(int argc, char *args[]) {
FILE *vhod, *izhod;
int c;
vhod = fopen(args[1], "rb");
izhod = fopen(args[2], "wb");
if ((vhod != NULL) && (izhod != NULL)) {
while (!feof(vhod)) {
c = getc(vhod);
putc(c,izhod);
}
fclose(izhod);
fclose(vhod);
printf("OK \n");
} else
printf("Napaka!\n");
}
|