Question: Hello, this is an assignment in C. We are supposed to use the template provided. Do not change the function definitions. Simply fill in your

Hello, this is an assignment in C. We are supposed to use the template provided. Do not change the function definitions. Simply fill in your code without changing the template. The last picture is what the template is like.

Hello, this is an assignment in C. We are supposed to use

the template provided. Do not change the function definitions. Simply fill in

your code without changing the template. The last picture is what the

template is like. 11.7 Week 9 Lab: Functions (1) Prompt the user

11.7 Week 9 Lab: Functions (1) Prompt the user to enter a string of their choosing (up to 100 characters long, which could include whitespaces). Then, output the string to the screen. (1 pt) (2) Complete the getNumAlpha0 function, which returns the number of letters in the user's string. (1 pt) (3) In main0, call the getNumAlpha0 function and then output the returned result. (1 pt) 4) Complete the encodeChar function, which returns the character stored in replaceChar if thisChar matches thatchar. Otherwise, the function returns the character stored in thisChar. (1 pt) (5) Complete the encodeString0 function, which should loop through the characters in usrStr making the following changes if necessary: 5) Complete the encodeString0 function, which should loop through the characters in usrStr making the following changes if necessary: . replace any numeric digit ('0'-'9') with # replace the upper case letter 'O' with the number 0 replace the upper case letter T' with the number '1 replace the upper case letter 'Z with the number '2 replace the upper case letter 'E with the number'3 replace the upper case letter H' with the number '4 replace the lower case letter 's' with the number '5 replace the lower case letter 'b' with the number 6 replace the upper case letter L with the number 7" replace the upper case letter 'B' with the number '8 replace the lower case letter 'g' with the number '9 All but the first replacement should be done by calling the encodeChar function for each. (1 pt) (6) In main0, call the encodeString) function and output the encoded string. (1 pt) All but the first replacement should be done by calling the encodeChar function for each. (1 pt) (6) In main0,call the encodeString0 function and output the encoded string.(1 pt Sample Input/Output: Enter a message: THE Answer to Life is 42... and big BIG ZoOs! You entered : THE Answer to Life is 42 and big BIG ZOOS! Number of characters: 46 Number of letters:30 Encoded message : T43 AnSwer to 7fe 5 ## and 619 81G 2005! 1 #include 2 #include 3 #include 4 5 //Returns the number of letters (alpha characters) in usrstr 6 int getNumAlpha(const char usrstr[]){ 7 8/*Type your code here.* 9 10 12 //Returns character stored in replaceChar if thischar matches thatChar, 13 //otherwise returns character stored in thischar 14 char encodeChar(const char thisChar, const char thatChar, const char replaceChar) ( 15 16 /* Type your code here. 18 19 20 //encodes usrstr following the replacement guidelines in the lab assignment description 21 void encodestring(char usrStr[]) Type your code here. 23 24 26 28 int main(void) { 29 30 Type your code here. 31 32 return e; 11.7 Week 9 Lab: Functions (1) Prompt the user to enter a string of their choosing (up to 100 characters long, which could include whitespaces). Then, output the string to the screen. (1 pt) (2) Complete the getNumAlpha0 function, which returns the number of letters in the user's string. (1 pt) (3) In main0, call the getNumAlpha0 function and then output the returned result. (1 pt) 4) Complete the encodeChar function, which returns the character stored in replaceChar if thisChar matches thatchar. Otherwise, the function returns the character stored in thisChar. (1 pt) (5) Complete the encodeString0 function, which should loop through the characters in usrStr making the following changes if necessary: 5) Complete the encodeString0 function, which should loop through the characters in usrStr making the following changes if necessary: . replace any numeric digit ('0'-'9') with # replace the upper case letter 'O' with the number 0 replace the upper case letter T' with the number '1 replace the upper case letter 'Z with the number '2 replace the upper case letter 'E with the number'3 replace the upper case letter H' with the number '4 replace the lower case letter 's' with the number '5 replace the lower case letter 'b' with the number 6 replace the upper case letter L with the number 7" replace the upper case letter 'B' with the number '8 replace the lower case letter 'g' with the number '9 All but the first replacement should be done by calling the encodeChar function for each. (1 pt) (6) In main0, call the encodeString) function and output the encoded string. (1 pt) All but the first replacement should be done by calling the encodeChar function for each. (1 pt) (6) In main0,call the encodeString0 function and output the encoded string.(1 pt Sample Input/Output: Enter a message: THE Answer to Life is 42... and big BIG ZoOs! You entered : THE Answer to Life is 42 and big BIG ZOOS! Number of characters: 46 Number of letters:30 Encoded message : T43 AnSwer to 7fe 5 ## and 619 81G 2005! 1 #include 2 #include 3 #include 4 5 //Returns the number of letters (alpha characters) in usrstr 6 int getNumAlpha(const char usrstr[]){ 7 8/*Type your code here.* 9 10 12 //Returns character stored in replaceChar if thischar matches thatChar, 13 //otherwise returns character stored in thischar 14 char encodeChar(const char thisChar, const char thatChar, const char replaceChar) ( 15 16 /* Type your code here. 18 19 20 //encodes usrstr following the replacement guidelines in the lab assignment description 21 void encodestring(char usrStr[]) Type your code here. 23 24 26 28 int main(void) { 29 30 Type your code here. 31 32 return e

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!