Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Program in C #Include Part 1 - Arrays: Write a program array_vs_ptr.c that prompts the user to input a string of letters (a-z), with a

image text in transcribed Program in C #Include
Part 1 - Arrays: Write a program array_vs_ptr.c that 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 array, skipping over all remaining spaces. Part 2 - Pointers: Write a program array_vs_ptr_2.c that performs exactly the same as the program from part 1, however apart from the array declaration and initialization, you CANNOT use square brackets in your code (i.e.(). Example input/outputs (underline is user input, bold is calculated/created by the program): Please enter a group of no more than 50 characters: asdflnasddf The number of t's in this array is: 0 The transformed string: aswflwaswdf Please enter a group of no more than 50 characters: tatarsauce The number of t's in this array is: 2 The transformed string: tawarwsawce Please enter a group of no more than 50 characters: topcheddar The number of t's in this array is: 1 The transformed string: towcwedwar

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

What must a creditor do to become a secured party?

Answered: 1 week ago

Question

When should the last word in a title be capitalized?

Answered: 1 week ago