Write a program **(IN C)** that displays all the phone numbers in a file that match the area code that the user is searching for. The program prompts the user to enter the phone number and
the name of a file. The program writes the matching phone numbers to the output file.
For example,
Enter the file name: phone_numbers.txt
Enter the area code: 813
Output: encoded words are written to file: 813_phone_numbers.txt
The program reads the content of the file and looks for phone numbers that match the area code entered by the user.
The output file name should be the same name as the input file but with an added area code at the beginning of the file name.
For example, if the original file name is abc.txt and the area code is 615, the output file name is then 615_abc.txt.
Assume the filename is no more than 100 characters. Assume the length of each line in the input file is no more than 100 characters.
Assume the input file contains no more than 1000 lines.
In the program, you should include the following function.
int search(char *area_code, char * phone_number );
The function expects area_code to point to a string containing the area code as a string and phone_number to point to a string containing the phone number as a string
Phone numbers in the file have the format of (###)###-####.
For example, (813)123-4567.
The function returns 1 if the phone number matches the area code , returns 0 otherwise.
The main function should handle file input and output. The main function calls the search
function to determine if a phone number in the input file matches the area code and write the phone number to the output file if it does.

![Cstacptemp.asca -code J- unn1: elue eton-: void mein C char flenome 201, axea code Lasea code- Site]: chon neuwfilenome [so n](http://img.homeworklib.com/images/4da9313e-0f7b-443c-a8c7-2943ac19ac33.png?x-oss-process=image/resize,w_560)
![ie p fopen (neufile nome, pint unable to opn Pite ehuan chon temp [30]: eading psiom Pile oirt mobile nombey while Cfgels (](http://img.homeworklib.com/images/1a30f043-c561-4580-8a63-38e6e50bac99.png?x-oss-process=image/resize,w_560)
Write a program **(IN C)** that displays all the phone numbers in a file that match the area code...
Write a simple telephone directory program in C++ that looks up phone numbers in a file containing a list of names and phone numbers. The user should be prompted to enter a first name and last name, and the program then outputs the corresponding number, or indicates that the name isn't in the directory. After each lookup, the program should ask the user whether they want to look up another number, and then either repeat the process or exit the...
****C PROGRAMMING**** (100 points) Write a program that prompts the user to enter the name of a file. The program encoded sentences in the file and writes the encoded sentences to the output file. Enter the file name: messages.txt Output: encoded words are written to file: messages.txt.swt The program reads the content of the file and encodes a sentence by switching every alphabetical letter (lower case or upper case) with alphabetical position i, with the letter with alphabetical position 25...
Exercise 3) Creating a QT program to search for Customer Phone Number : Create a text file (customer.txt) and put names and phone numbers into it. each name has to have its own phone number right under it. In the QT window, the user has to enter a name and the program prints the phone number related to it. NB: If the user input a name that doesn't exist, the program should print an error message. Text file example: QT...
Write the program in C
The following statistics for cities of the Vege country are stored in a file: Name: a string of characters less than 15 characters long. Population: an integer value. Area: square miles of type double Write a program that: asks and gets the name of the input file from the user. Read the contents of the file into an array length 10 of structures -ask the user for the name of a city (less than 15...
Write a telephone lookup PYTHON program. Read a data set of names and telephone numbers from a file that contains the numbers in random order. Handle lookups by name and also reverse lookups by phone number. Use a binary search for both lookups. Use the following data set: Bob|555-1234 Joe|555-2345 John|555-3456 Luke|555-4567 Mark|555-5678 Matthew|555-6789 The program should prompt the user as follows: L)ookup Name, Lookup N)umber or Q)uit? Enter the name: Or Enter the Number:...
write a code on .C file
Problem Write a C program to implement a banking application system. The program design must use a main and the below functions only. The program should use the below three text files that contain a set of lines. Sample data of these files are provided with the assessment. Note that you cannot use the library string.h to manipulate string variables. For the file operations and manipulations, you can use only the following functions: fopen(),...
In C++ Programming Write a program in a file named SeedFinder.cpp that finds and displays all the seeds of a integer given by the user. Let’s define a seed of an integer, n, to be a positive value that equals n when multiplied by its individual digits. For example, 23 is a seed of 138 because 23 × 2 × 3 = 138. 111 is an example of a seed of itself because 111 × 1 × 1 × 1...
Write a C program to “de-vowel” an input string. Assume that the user provides input containing only the characters a through z (i.e., all lowercase letters). Your program should create an output string that deletes all vowels from the input string, pushing the letters together to fill any gaps. For example, given the input “theturtleandthehare” your code should print out “thtrtlndthhr”. Your program should create an output string from the input string, before printing its output. Sample Input: Enter a...
In C++, Write a program that retrieves a phone number from a database of names and phone numbers. The program should ask the user to enter a name and then print the phone number of that person (or vice versa, number into name) The program should allow the user to repeat the operation as often as they would like to. The data is contained in two text files named "phoneNames.txt" and "phoneNums.txt". The files have one name or one phone...
MUST BE PROCEDURAL CODE, DO NOT USE GLOBAL VARIABLES. Write a program in C++that generates random words from a training set as explained in the lectures on graphs. Do not hard-code the training set! Read it from a file. A suggested format for the input file: 6 a e m r s t 10 ate eat mate meet rate seat stream tame team tear Here are some suggestions for constants, array declarations, and helper functions #include <iostream> #include <fstream> #include...