Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Structured Search For Big Data From Keywords To Key-objects

Authors: Mikhail Gilula

1st Edition

012804652X, 9780128046524

More Books

Students also viewed these Databases questions

Question

How many Tables Will Base HCMSs typically have? Why?

Answered: 1 week ago

Question

What is the process of normalization?

Answered: 1 week ago