Question: const Implement a function with the following interface: char *my_toupper(char *dest, char *src). Function argument src points to the string that you should modify as

 const Implement a function with the following interface: char *my_toupper(char *dest,

const Implement a function with the following interface: char *my_toupper(char *dest, char *src). Function argument src points to the string that you should modify as described below. The modified string will be written at address dest. In addition the function should return pointer to the modified string (i.e., to the same address dest originally points to). The string should be modified in the following ways: all letter characters should be changed to upper case. You can use function toupper, that converts one character to upper case for this. toupper is defined in header ctype.h, so you should add #include at the beginning of your program if you decide to do this. If the original string has a question mark (?'), it should be changed to exclamation mark (!). If the original string has period (..), it should be replaced with three exclamation marks. You will not modify the original string, but write the result in location pointed by the dest variable. For example the following main function: #include // for printi #include // for memset #include // for toupper int main(void) { char dest [200); /* The following helps detecting string errors, e.g. missing final nil */ memset (dest, '#', 199); dest[199] = 0; printf("%s", my_toupper (dest, "Would you like to have a sausage? It will be two euros. Here you are. ")) printf("3", my_toupper (dest, "Madam, where are you going? The health care center is over there. ")); return 0; } Would output: WOULD YOU LIKE TO HAVE A SAUSAGE! IT WILL BE TWO EUROS!!! HERE YOU ARE!!! MADAM, WHERE ARE YOU GOING! THE HEALTH CARE CENTER IS OVER THERE

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!