Question: code in c++ 1) Write a function that takes as an input parameter a string and the length of the string (for the second parameter,
code in c++
1) Write a function that takes as an input parameter a string and the length of the string (for the second parameter, use call by reference). It then goes through the string, character by character. If the character is a vowel, it concatenates ithag as well as the vowel. Otherwise it just concatenates the letter to the new string. It modifies the length parameter to the new string length, The function should return the new string. You should make at least 1 test case, and when the function is finished, print out both the new string and the new length. In the test case, do not have the user type in the string-- define in the test case what string is going to be used (ex: string x="cat")
Examples:
Cat, 3 -> cithagat, 8
Cover, 5 -> cithagovithager, 15
Balsamic, 8 -> bithagalsithagamithagic, 23
Note: for this lab well consider y a vowel.
(Now you are creating the gibberish language)
NOTE: you can convert a character to a string using string(1,s[0]), for example
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
