#include void main(int argc, char * argv[]) { FILE * infile; FILE * outfile; char byte; if(argc!=3) { printf("Sintassi: CRYPT nomefile-input nomefile-output\n"); return; } infile=fopen(argv[1], "r"); if(infile==NULL) { printf("Impossibile aprire in lettura il file [%s]\n", argv[1]); return; } outfile=fopen(argv[2], "w"); if(outfile==NULL) { printf("Impossibile aprire in scrittura il file [%s]\n", argv[2]); return; } while(!feof(infile)) { byte=fgetc(infile); /* byte=getc(); */ if(byte == EOF) break; byte--; fputc(byte, outfile); } fclose(infile); fclose(outfile); }