[Solved]Write C Program Solve Following Problem Create Text File Named C1txtand Write Brand Comput Q37227548
Write a C++ program to solve the following problem.
- Create a text file named c1.txtand write your brand ofcomputer (like Dell, HP, etc) in the file. You will be reading thename of the file from the keyboard as a string, using the stringclass. Your program will also read the brand of your computer fromthe keyboard. The process of the file creation (name of the file,mode for opening the file, and testing the open success is done ina user-defined function. The function communicates the status offile open to the calling function).
- Create a text file named c2.txtand write your computermodel in the file. You will be reading the name of thefile from the keyboard as a string, using the string class. Yourprogram will also read the model of your computer from thekeyboard. The process of the file creation (name of the file, modefor opening the file and testing the open success is done in auser-defined function. The function communicates the status of fileopen to the calling function)
- Create a text file named myComputer.txtand write thebrand of your computer from the file c1.txt, and the modelfrom file c2.txt. You will be reading the nameof the file from the keyboard as a string, using the string class.The process of the file creation (name of the file, mode foropening the file and testing the open success is done in auser-defined function. The function communicates the status of fileopen to the calling function)
- At this time, each file will have one line of text in it.
- Prepare the files for reading.
- Display the results of the three files in the order shownbelow:
c1.txt yourbrand of computer as written in the c1
c2.txt yourmodel of the computer as written in the c2
myComputer.txt yourcomputer brand and the model as written in myComputer
Note that there is a single spacebetween the Computer brand and thecomputer model whenyou display the contents of the file myComputer.txt.
You will use a user-defined functionto display all the files at once or one at a time.
- Close all files. You will use a user-defined function thatcloses each file separately or all at once.
- Run the program again and use your choice of the filenames, anddifferent names, different than what you used above and repeat theprocess.
The programs in the book and sample programs provided show youhow to read file names as strings and how to convert the strings tothe C string, if needed.
11. Do notuse <stdio.h>and <conio.h> in this assignment and all otherassignments.
12. Do notuse any#definein your program until the time that isrequired for class declaration header files.
Expert Answer
Answer to Write a C++ program to solve the following problem. Create a text file named c1.txtand write your brand of computer (lik… . . .
OR

