Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In C implement a function with the following interface: char *my_toupper(char *dest, const char *src). Function argument src points to the string that you should

In C implement a function with the following interface: char *my_toupper(char *dest, const 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.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Concepts of Database Management

Authors: Philip J. Pratt, Mary Z. Last

8th edition

1285427106, 978-1285427102

More Books

Students also viewed these Databases questions

Question

What do you need to know to develop an audience profile? [LO-2]

Answered: 1 week ago