Professional Documents
Culture Documents
CNS 10
CNS 10
#include <stdio.h>
int main(){
FIL E *fp1, *fp2;char a;
fp 1= fopen("test.txt", "r");if (fp1 ==
NULL)
{ puts ("cannot open test. txt file");exit(1);
}
fp2 = fopen ("test1, txt", "w");if (fp2 ==
NULL){
puts ("Not able to test1 txt file");fclose (fp1);
exit (1);
a= fget (fp1);
fprintf (fp2, “%c", a+3);
while (a! = EOF){
a= fgetc (fp₁);
fprintf (fp2,”%c", a+3);
printf("test.txt is successfully encrypted and stored to test1. txt");printf ("n/test.txt
can be forwarded to destination");
fclose (fp1); fclose
(fp2);return 0;
}
test.txt
Deepika
Deepika
Output: -
test. txt is sucessfully encrypted and stored to test1.txttest1.txt can be
forwarded to destination.
test 1. Txt
29
19hhslnd