Question: In c. With a makefile. Write a function that asks the user to input a telephone number as a string containing a three digit area

In c. With a makefile.  In c. With a makefile. Write a function that asks the

Write a function that asks the user to input a telephone number as a string containing a three digit area code, followed by a seven-digit number. Any other characters will be ignored, and only the first 10 digits will be considered. Assume that the string has at most 200 characters. Ifthe user does not provide at least 10 digits, an error message should be printed out. It should report the telephone number in the format (123) 456-7890. Note that the user may choose any input format, yet the program should maintain a consistent output format. The function should be called phone fmt. Your executable will be called phone. The function and main should be in the files phone fmt.c, phone fmt.h and phone.c, respectively. a. [10pt] You must include a Makefile that will build the exccutable and it should be named phone. Examples: Input: 1234567890 Output: (123) 456-7890 Input: abc123-456-7890 Output: (123) 456-7890 Input: 123456 Output: ERROR: Not enough digits on input

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!