Question: Write a program that performs the tasks described below. Define the following functions void A ( char str [ ] ) Takes string str and

Write a program that performs the tasks described below.
Define the following functions
void A(char str[]) Takes string str and converts all non-letters to the * character
in it.
Ex: a1b2c becomes a*b*c
void B(char str[]) Swaps the first half of str with the second half of str
Ex: abcxyz becomes xyzabc
void C(char str[]) Reverses the order of the characters in the first half of str.
Ex: abcxyz becomes cbaxyz
void D(char str[]) Reverses the order of the characters in the second half of str.
Ex: abcxyz becomes abczyx
(For the functions B, C, and D, if the length of str is odd then the character in the middle of str
will not change.)
Construct two arbitrary strings and print them on the screen. They can be at any length.
o The first one will be the string that will be manipulated by the functions above.
o The second one will contain a combination of letters A, B, C, and D. The order of
these letters in the second string represents the calling order of the related
functions.
Send the first string to the first function. Then, the updated string will be sent to the next
function as a parameter. At each function call, the updated string should be printed on
the screen.
The program should terminate after all the functions in the second string are called.
NOTES:
If you need, you can implement other necessary functions in addition to the functions
above.
You cannot use any library functions other than printf();

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!