subject

For this lab, you are going to create two programs. The first program (named AsciiToBinary) will read data from an ASCII file and save the data to a new file in a binary format. The second program (named BinaryToAscii) will read data from a binary file and save the data to a new file in ASCII format. Background Preparation: Review file I/O for ascii and binary formatsSpecifications:Your programs will use the following structure to hold the data that is read and to be written:typedef struct _FileData{int a;double b;char dataStr[56];} FileData;Both programs will obtain the filenames to be read and written from command line parameters:bash$ AsciiToBinary ascii_in binary_outbash$ BinaryToAscii binary_in ascii_outThe data format in the ASCII format files (both reading and writing) will be one data item per line:4734.278This is a line of textA sample ASCII format file is provided. There will be a set of three lines for each FileData structure's data. There will be no blank lines between each set of three lines. The size of each record for the binary file will be the same as the size of the FileData structure. The specific method that you use to read and write the data is up to you. You may wish to read all the data from the input file before writing to the output file, or you may wish to write each record as it is read. Be sure to close both files (input and output) before exiting the program. Testing:Besides testing your code with your usual methods, you should also test your programs by reading an ASCII file, converting it to binary, then reading the binary file and converting it to ASCII. The new ASCII file should match exactly with the original ASCII file

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 10:00
When is an original work considered public domain? a. when posted via social media b. when it is posted on the internet c. when a copyright symbol is not included with the piece of work d. when explicit permission is given by the author / owner
Answers: 1
question
Computers and Technology, 22.06.2019 10:30
How can a user open a blank presentation? 1.on the file menu, click new, and then click recent templates 2.on the file menu, click new, and then click blank presentation 3. on the view menu, click templates, and then click recent templates 4. on the view menu, click samples, and then click blank presentation
Answers: 1
question
Computers and Technology, 23.06.2019 07:30
What is the penalty for violating section 1201 of title 17 chapter 21 of the us code
Answers: 1
question
Computers and Technology, 23.06.2019 15:30
Hey so i was just trying out some game hacks so i took a paste from online and built it in my visual studio and then suddenly my computer was working or clicking on stuff on its own am i hacked?
Answers: 1
You know the right answer?
For this lab, you are going to create two programs. The first program (named AsciiToBinary) will rea...
Questions
question
Mathematics, 23.10.2020 18:40
question
Mathematics, 23.10.2020 18:40
Questions on the website: 13722361