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 16:20
It policy compliance and emerging technologies respond to the following: propose at least three control measures that organizations need to put in place to ensure that they remain complaint with emerging technologies and in a continually changing it environment. examine the correlation of effective configuration management and change control procedures to remain compliant with emerging technologies and it security changes.
Answers: 2
question
Computers and Technology, 22.06.2019 22:00
Discuss the ways in which electronic information associated with payments is addressed in terms of security. include encryption, secure sockets layers, and secure electronic transactions in your discussion. are there any other ways that consumers and businesses can keep their payment information secure in an electronic commerce environment? do you feel that your information is safe when conducting electronic business? why or why not?
Answers: 1
question
Computers and Technology, 23.06.2019 06:00
How can a user delete a drawing object
Answers: 1
question
Computers and Technology, 23.06.2019 16:30
Which of the following is not an enhancement to the standard wiki to make it more attractive for corporations? encryptionwork spacespermission toolspredictive text
Answers: 2
You know the right answer?
For this lab, you are going to create two programs. The first program (named AsciiToBinary) will rea...
Questions
question
History, 03.11.2020 23:10
question
Mathematics, 03.11.2020 23:10
Questions on the website: 13722363