CSCI 101: Fundamentals of Computer Programming Lab 7: Using looping and files (iteration/repetition) statements in C++ Programs 1) Copy files named Loop_Lab_A.txt, Loop_LabB.txt, no_data.txt, Loop_LabA.cpp and Loop_LabB.cpp from BB to your computer and transfer them to your UNIX account.2) Log into your UNIX account and compile Loop_LabB.cpp. Run the program and use the data file provided (Loop_LabB.txt) to provide the data. What is the output that is printed on the monitor?3) Edit file named (Loop_LabB.cpp), change the program by modifying the switch statement to find the number of illegal characters in the file. Run the program again with the same data, what is the output?4) Edit the file and change the code so the output is printed in a tabular format to an output file. Output file name is provided by user. Run and test program with the same data file again.The output on the monitor should look like the following: Sample 1 output on the monitor: (Good file name)Enter input file name : Lab6B.txt Enter output file name: data.txt
This is the end of the preview.
access the rest of the document.