suppose you wrote a program that writes data using cout. you are now required to implement it so that you can write data to a file. you are considering the following changes.i. declare an ofstream variable out fileii. replace all occurrences of cout with out fileiii. replace all occurrences of << and put line with the appropriate operations for ofstream objectswhat changes do you need to make?