Question: The program prompts the user to input a string of letters ( a - z ) , with a maximum length of 5 0 .

The program prompts the user to input a
string of letters (a-z), with a maximum length of 50. Your program must read these characters into an
array, and then perform the following tasks on the array:
1. Count the number of 't's in the array.
2. Change every third character to a 'w '.
Lastly, your program should print the string, skipping over all remaining spaces.
No asterisk * should appear in your code. You are expected to use indexing instead of
pointers.
Three examples are provided below as the three examples work for both Part 1 and Part 2.
Part 2- Pointers:
Please check the starter code array_vs_ptr_2.c and complete it. The program performs exactly the same
as the program from part 1 but with the following different requirements:
No square brackets [] should appear in your code. You are expected to use pointers instead
of indexing.

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 Programming Questions!