subject

Your mission is to read this uber-classified memo from the Grand Poobah of annan. Of course, it's in code, so you'll need to write a program to decrypt your message. The code is set up so that for the nth element in the array, you will need to read its nth letter. (Ex: if pirates is in array position 0, then print letter 0 of the word, which = p. if gangway is in array position 4, then print letter 4 = w.) To accomplish this, your main function should do the following: a. Declare 4 separate arrays of strings called secrets1, secrets2, secrets3, & secrets4 and assign them the following values:

1. secrets1: { "platypus", "plethora","trend", "croak","almost", "toaster" };
2. secrets2: { "fire", "seen","trend", "produce" };
3. secrets3: { "tiretread", "chains", "stern", "bed bug" };
4. secrets4: { "oracle", "stetson","mother", "stie", "twigrot" }

b. Call the function decode 4 times - once for each array variable (secrets1, secrets2, secrets3 & secreets4) from Step a. (You'll have to do this with 4 lines of code; you can't use a loop for it.)

c. Write a void function called decode that will 1. Accept an array of strings, and the integer array length as the parameters. ii. Read through each word in the array. If the word is in the nth position of the array, then print the nth letter for that word. (For array item 0, print the letter at position 0 in the word. For array item 1, print the letter at position 1 in the word...etc.) Print all of the letters from this array on one line. iii. Print a blank line

ansver
Answers: 1

Other questions on the subject: Computers and Technology

image
Computers and Technology, 21.06.2019 21:30, willwhitlock803
Write code using c . (take input from user) calculate the size of a given file in kbs. in this task you will complete the function with the following prototype: float get_file_size(char * filename); the function takes the file name (address to the start of a null terminated character array) as input. the function should then open the file and find the number of bytes it contains till eof. the number of bytes divided by 1024 will give the size in kbs. if the file cannot be opened the function should return -1.
Answers: 2
image
Computers and Technology, 22.06.2019 02:00, sabrinarasull1pe6s61
Which of the following is a way the operating system prevents unknown or unauthorized users from accessing the system?
Answers: 2
image
Computers and Technology, 23.06.2019 18:30, erjalinalii
Janice recently received her college degree and is looking for a job. she is worried that since she just finished school, she will be required to repay her perkins and direct subsidized loans immediately. janice pulls out the paperwork she signed and reviews it again for repayment information. after reading all of the information, janice discovers that
Answers: 2
image
Computers and Technology, 24.06.2019 07:50, treytonmesser
Write a defining table and then a program that determines if you can sleep in or not. your program should get all its input from your computer’s clock. on all weekdays (monday through friday) that are not holidays, your program should output “get up! ” on all other days (weekends and holidays), your program should output “sleep in.” the three holidays that your program must check for are january 1 (new year’s day), july 4 (u. s. independence day), and december 25 (christmas). you don’t need to include other holidays in your program because most other holidays do not occur on a fixed day each year.
Answers: 1
You know the right answer?
Your mission is to read this uber-classified memo from the Grand Poobah of annan. Of course, it's in...

Questions in other subjects:

Konu
English, 22.09.2021 20:00
Konu
English, 22.09.2021 20:00
Konu
Mathematics, 22.09.2021 20:00