I am just working on substitution cipher program. reading from one file and substuted characters by other characters and write in new file.
I dont want to substitute space ' ' and next line.
How can make sure that when function read next line from first file it automatically goes to next line in 2nd file?
Here the code :
Code:while((ch=fgetc(fpsource))!=EOF) { if(ch!=' ') { for(i=0;i<strlen(str1);i++) { if(ch==str1[i]) { fputc(str2[i],fptarget); break; } } } else fputc(ch,fptarget); }