Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. (60 points) Write a program that modifies a word by replacing every alphabetical letter (lower case or upper case) with a digit (2-9). The

1. (60 points) Write a program that modifies a word by replacing every alphabetical letter (lower case or upper case) with a digit (2-9). The numbers 2 through 9 each have three letters associated with them, as is indicated by the following table:

image text in transcribed

Input: TAKEOUT

Output:8253688

Your program should include the following function:

voidconvert(char *word,char *numbers);

The function expects word to point to a string containing to be translated ; numbers represent sthe pointer pointing to the string storing the numbers. For example, if the is TAKEOUT the function will store 8253688 pointed by numbers.

1)Name your program word_numbers.c

2)Assume input is no longer than 1000characters.

3)The convert function should use pointer arithmetic (instead of arraysubscripting). In other words, eliminate the loop index variables and all use of the [] operator in the function.

4)To read a line of text, use theread_line function (the pointer version) in the lecture notes.

DigitLetter Digit Letter MNO PQRS TUV WXYZ ABC6 DEF 7 GHI JKL 10

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

Students also viewed these Databases questions

Question

what is a peer Group? Importance?

Answered: 1 week ago

Question

Understand the different approaches to job design. page 167

Answered: 1 week ago