Question: 1. Write a function void capitalize (char *) that is passed a string and modifies that string to capitalize all lowercase letters in the string.

1. Write a function void capitalize (char *) that is passed a string and modifies that string to capitalize all lowercase letters in the string. I recommend you use the toupper function.

2. Write the function void censor(char *, const char *) that modifies a string (its first argument) by replacing every occurence of a patternn string (the second arguement) with all X's.

Example for #2:

String? hi mom how is it going? See you soon. // defined string

pattern? going //user input

after call to censor: hi mom how is it XXXX? See you soon. //# of X's match number of letters in pattrn string

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!