Question: 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
code in c
Provide a screenshot of the code code in c Write and run

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

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!