Write aC++ functionnamed 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)
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here