Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Provide a screenshot of the code code in c Write and run a C program that performs the following: Create three arrays of characters named
Provide a screenshot of the code
Write and run a C program that performs the following: Create three arrays of characters named myText of size 40, oldText of size 4 and newText of size 4. prompts the user to enter three strings and store them in the three character-arrays Print the three strings Passes the three stringsto a C function named repalceStr. The function receives three Strings in the form of pointer to character as in the following: void repalceStr(char *text, char * oldval, char * newval) Your function should replace all occurrences of the string oldval by the newval. Assume that oldval and the newval have the same length and are distinct. For example, if the arrays have the following data: myText array has "BABCAACE EAABC ZZADA" oldText has "ABC" newText has "POZ" then findAndRepalce(myText, oldText, newText); should modify the characters in myText to "BPOZAACE EAPQZ ZZADA" in the main, print the three strings after the function call code in c
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started