subject

In this assignment you'll write a program that calculates the checksum for the text in a file. Your program will take two command line parameters. The first parameter will be the name of the input file for calculating the checksum. The second parameter will be for the size of the checksum (8, 16 Command Line Parameters 1. Your program must compile and run from the command line.
2. The program executable must be named "checksum" (all lower case, no spaces or file extension)
3. nput the required file names as command line parameters. Your program may NOT prompt the user to enter the file names. The first parameter must be the name of the file used for calculating the checksum, as described below. The second parameter must be the size, in bits, of the checksum. The sample run command near the end of this document contains an example of how the parameters will be entered Your program should open the two files, echo the processed input to the screen, make the necessary calculations, and then output the ciphertext to the console (terminal) screen in the format described below.
4. Checksum size The checksum size is a single integer, passed as the first command line argument. The valid values are the size of the checksum, which can be elther 8, 16, or 32 bits. Therefore, if the first parameter is not one of the valid values, the program should advise the user that the value is incorrect with a message formatted as shown below: printf "Valid checksum sizes are 8, 16, or 32ln):; The message should be sent to STDERR. Format of the input file The input file will consist of the valid ASCII characters associated with the average text file. This includes punctuation, numbers, special characters, and whitespace.

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 06:50
Match the personality traits with their description
Answers: 1
question
Computers and Technology, 22.06.2019 09:00
Howard is designing a chair swing ride. the swing ropes are 5 meters long, and in full swing they tilt in an angle of 29° outside chairs to be 2.75 m above the ground in full swing.
Answers: 1
question
Computers and Technology, 23.06.2019 04:00
Another name for addicting games.com
Answers: 1
question
Computers and Technology, 23.06.2019 23:30
A. in packet tracer, only the server-pt device can act as a server. desktop or laptop pcs cannot act as a server. based on your studies so far, explain the client-server model.
Answers: 2
You know the right answer?
In this assignment you'll write a program that calculates the checksum for the text in a file. Your...
Questions
question
Mathematics, 28.09.2021 20:20
question
Arts, 28.09.2021 20:20
question
Mathematics, 28.09.2021 20:20
Questions on the website: 13722360