subject

For this program, you will write a chunk based decryption program. study the base code and make the following changes: • implement loop over each string in the array of message chunks (strings) and print it. each chunk should be printed back to back, do not insert an extra newline. do not print the rst character in each string since it is only used to store the order of the chunks. (hint: use pointer arithmetic to skip a character.) [2 points] • implement loop over each string in the array and shift the characters in it by subtracting decryption_shift value from them. use pointer arithmetic to access individual characters but array access to the strings. remember that c-style strings have a null terminator at the end. do not apply the shift to the terminator. (hint: to avoid doing double pointer arithmatic, save a char* pointer to the active chunk[? ] in the outer loop but before the inner loop. then the inner loop is only concerned with a single array of characters rather than an array of strings.) [4 points] • implement using your favorite sorting algorithm, sort the array containing the message chunks. sort based on the rst character in the chunk - it will always be a number. we provide a swap_strings function that you may use. example usage: swap_strings(chunks[0], chunks[1]) will swap the contents of the rst and second string. [10 points]

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 23:30
Show that there is a language a ⚆ {0, 1} â— with the following properties: 1. for all x â a, |x| ≤ 5. 2. no dfa with fewer than 9 states recognizes a. hint: you don’t have to define a explicitly; just show that it has to exist. count the number of languages satisfying (1) and the number of dfas satisfying (2), and argue that there aren’t enough dfas to recognize all those languages. to count the number of languages satisfying (1), think about writing down all the strings of length at most 5, and then to define such a language, you have to make a binary decision for each string about whether to include it in the language or not. how many ways are there to make these choices? to count the number of dfas satisfying (2), consider that a dfa behaves identically even if you rename all the states, so you can assume without loss of generality that any dfa with k states has the state set {q1, q2, . . , qk}. now think about how to count how many ways there are to choose the other four parts of the dfa.
Answers: 3
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 23.06.2019 13:30
Me ! evelyn is a manager in a retail unit. she wants to prepare a report on the projected profit for the next year. which function can she use? a. pmt b. round c. division d. what-if analysis
Answers: 2
question
Computers and Technology, 24.06.2019 01:10
Create a program that will take in a single x and y coordinate as the origin. after the input is provided, the output should be all of the coordinates (all 26 coordinates read from the “coordinates.json” file), in order of closest-to-farthest from the origin.
Answers: 1
You know the right answer?
For this program, you will write a chunk based decryption program. study the base code and make the...
Questions
question
Biology, 24.07.2019 02:30
question
Mathematics, 24.07.2019 02:30
question
English, 24.07.2019 02:30