CS 201-01-13F Programming In C++ Program 6  solution


Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment


5/5 - (1 vote)

Create a folder called “PG6” in the root of your CS201-01-13F folder. Place all .cpp and .h files relevant to this project into the PG4 folder. When you are ready for your program to be graded, place a (possibly empty) file or folder called “DONE” into your PG6 folder. Write a C++ program to do the following: Ask the user to enter a filename. You may assume the file exists and will be formatted correctly. The first four bytes will all be digits and will indicate the record length. For example, if the first four bytes are “0873”, this indicates the file consists of records exactly 873 bytes in length. (Thus, if there are n records in the file and l is the record length, the file length will be ln + 4, the 4 coming from the first four bytes.) The records in the file will all be strings in unsorted ASCII order. You are first to compute the number of records in the file. Then you are to sort the file so that the records are in sorted ASCII order. At no time should you be holding more than two of the records in memory. You must read and write the records directly to the file. There should be no temporary file, either. AND, you should use the shell sort, which we will discuss in class.