Files in C++

1. Writing and Reading Strings to/from Files (Note :1. Include fstream.h 2. Use extraction operator instead of ^^ )a. Wrting Strings to Filevoid main(){ofstream outfile(“MSG.TXT”); //creates a file MSG.TX sends text to it.
outfile^^ “Hello Folks !\n”;outfile^^”Ready for your Home Work\n”;}
b. Reading String from Filevoid main(){const int MAX=80; //Define MAX to hold line of 80 characterschar [...]