Question: in a C program follow the requirements from below Translate the first character of the pair by multiplying its face value by 16. Remember that

in a C program follow the requirements from below

Translate the first character of the pair by multiplying its face value by 16. Remember that hex values of A through F take on the face values of 10 through 15. Then add the face value of the second character in the pair.Lets call the resulting valueoutChar.

All that you are doing here is getting the decimal value of the 2 hex digits...For example:Reading the pair of characters 38 from the encrypted file will translate intoan outChar value of 56 decimal.

Reading the pair of characters 5C from the encrypted file will translate into an outChar valueof 92 decimal.

e. Now you need to add 16 to outChar.

f. If the resulting outChar value is greater than 127, then another step must be taken: outChar = (outChar-144) + 32

g. The outChar value now contains the decrypted ASCII code for the character that you have just decoded. So take this decrypted character value (i.e. outChar) and write it to the destination file as a character.

For example

if the input(encrypted) file is

385F6710596310596410575F95E572F7A

and it will output:

"How is it going"

in the console

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!