Write a Program for Encrypting File Data

/*
    Encrypting File Data
*/
#include<iostream>
#include<fstream>
using namespace std;

int main()
{
    char c;

    ifstream of("ABC.txt",ios::in);
    ofstream ofs("Encrypt.txt",ios::out);

    of.get(c);

    while(!of.eof())
    {
        c=c+3;
        ofs<<c;
        of.get(c);
    }

    of.close();
    ofs.close();

    cout<<"\n\n Encrypted Sucessfully!!";
    return 0;
}

Previous
Next Post »