Write a function which takes one string variable (not C string) as input and mod
ID: 3645954 • Letter: W
Question
Write a function which takes one string variable (not C string) as input and modifies the existing string. Try to find "Ohio" or "OHIO" in the input string. If the input string contains either of these, replace those 4 characters with "OH". As an example,Original string = "Blacklick, Ohio 43004"
Modified string = "Blacklick, OH 43004"
Use an appropriate parameter passing mechanism. Your function will not do any cin or cout. Do not write a main function. Make sure to properly format all your code.
Explanation / Answer
void fun(String s) { String s2;String s3; for(i=0;iRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.