Question: For this assignment, you will be required to use C . In this assignment, you will be required to take in a file as an
For this assignment, you will be required to use
In this assignment, you will be required to take in a file as an argument from the command line
This file will contain an existing database of client information.
Note: you can assume the file format will consistently be the same as the one provided.
Format to expect:
'John Smith', Charming Avenue', 'Senior Dev'n
'Tyler Robinson', Owl foot drive', 'Junior Dev'n
Main:
In your main function, you will create a menu that will display to the user that will take in
user input and call the appropriate functions. No processing will actually be done in main, main
will primarily be used for passing your command line args to the appropriate functions and
displaying the menu to navigate to the required operation. The program should repeat until is
entered
Output Example
Please enter the number for the operation you want to execute:
Print Database
Look Up By Name
Exit
Create a function called "populateDatabase
This function should use the file entered as an argument to create an array of that same size in the
above example it's cols by rows table using malloc. Once the array is created you are to then
populate the array using the contents of the file. If an empty file is provided then an error should bereturned and the program should exit gracefully. If the file doesn't contain the expected format, it
should return an error and exit gracefully. At no point in your program should it crash and produce
errors when it encounters something it doesn't expect.
Create a function called "printDatabase
simple prints the contents on your array in an organized and readable way for the user
Create a function called "lookUpByName
As the function name implies, in this function you ask the user which name they want to
find, then carry out a search, and display the appropriate row. If no entry is found, return an error
that says No Such Entry Exists' and reprompt the user for input
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
