Question: void insertchar (char string[], charc, int index) void insertChar (char string[], char c, int index) string parameter: String which the function will add a character.

 void insertchar (char string[], charc, int index) void insertChar (char string[],
void insertchar (char string[], charc, int index)
void insertChar (char string[], char c, int index)
string parameter: String which the function will add a character.
c parameter: The character to be added to string.
index parameter: The index which the function will insert the character.

2. (40 pts) Now, using insertChar function you wrote in previous question, write a program which will get a sentence from user and, if there are comma(s) but no space(s) after them, will add a space after each comma and print the sentence as corrected, if there is no comma, print the sentence as it is. Notes: 1. Only methods and functions we learned during the course should be used. Otherwise, it will not be graded. Example inputs and outputs Input Output However, I have to leave now. However, I have to leave now. They are red and green, respectively They are red and green, respectively. I like reading swimming painting and walking. I like reading, swimming, painting and walking

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!