Question
This is the third time im posting this question and got wrong answers every time .Please can someone do it correctly acoording the lab instruction.
This is the third time im posting this question and got wrong answers every time .Please can someone do it correctly acoording the lab instruction. This is in C programing language, Thanks a lot.(please show the out put for both programs).
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.
Specifications: Both programs will obtain the filenames to be read and written from command line parameters. For example:
bash$ AsciiToBinary ascii_in binary_out bash$ BinaryToAscii binary_in ascii_out
The data contained in the ASCII file (both reading from and writing to) will be 10 signed integers, 10 floating point numbers, and 10 lines of text. There will be only one data item per line, and each line of text will contain up to 40 characters (including ' ' and the NULL terminator). The following link is ascii_file.txt
https://mymasonportal.gmu.edu/bbcswebdav/pid-7238113-dt-content-rid-107238393_1/xid-107238393_1
The data contained in the binary file (both reading from and writing to) will be 10 signed integers, 10 floating point numbers (of type double), and 400 characters. You may find it helpful to think of the 400 characters as 10 sets of 40 characters each.
The following link is binary_file.bin
https://mymasonportal.gmu.edu/bbcswebdav/pid-7238113-dt-content-rid-107238394_1/xid-107238394_1
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.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started