Write a C++ function named louder which accepts a pointer to a C-string as its argument. It should do 3 things: - change any period (.) in the C-string to an exclamation point (!) - change any lower...


Write a
C++ function
named louder which accepts a pointer to a C-string as its argument.  It should do 3 things:


- change any period (.) in the C-string to an exclamation point (!)


- change any lower case letter in the C-string to the corresponding upper case letter


- return the number of characters which were changed



You may assume that parameter str points to a valid, null-terminated C-string containing only alphabetic characters, spaces and periods.  You do not need to demonstrate calling this function.


Example: if str points to an array containing "Giants win." the function should change the array so that it contains "GIANTS WIN!", and should return 9.




You must use this function signature:



int louder(char *str)



















Jun 03, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here