#include structure definition functionl that prints out a character array function2 that scans a character array function3 that scans info of passport (this function should call function 2) function4 that prints out information of passport (this function should call function 1) main function ask how many passports create array of structures iterate through each structure and get information iterate through each structure and print out information How many passports will we be creating today? 2 Please input ID of passport 1: 15625 what is the gender? M First Name? (end with a dot)Kyle. Last Name? (end with a dot)Smith. Address? (end with a dot)123 Lead Ave SE. Please input ID of passport 2: 15626 What is the gender? F First Name? (end with a dot)clair. Last Name? (end with a dot) Smith. Address? (end with a dot)1059 Dr MLK Jr NE. Info of User 1: ID: 15625 Gender: M First Name: Kyle Last Name: Smith Address: 123LeadAveSE Info of User 2: ID: 15626 Gender: F First Name: Clair Last Name: Smith Address: 1059DrMLKJrNE
Programing C
First, you should ask how many passports will be issued.
Then, ask for the first name, last name, address, passport ID and gender of each passport.
Lastly, print out the information.
Follow some guidelines when writing your code: You should have one structure definition with the following members:
· FirstName: should be a character array, accepting at most 100 characters
· LastName: should be a character array, accepting at most 100 characters
· Address: should also be a char array, accepting at most 100 characters
· PassportID: should be an integer
· Gender: should be a single character
You should at least have five functions (including main) in your code. You can have more if you want, but you should at least have five. I recommend the following functions
· One function that scans the information of each passport.
· One function that scans a character array. In my opinion, this is the most important one, since you will be able to re-use it every time you need to read a first name, a last name or an address.
· One function that prints out the information of each passport.
· One function that prints out contents inside a character array. Also of ample importance, since you will be able to re-use it every time you need to print a first name, last name or address.
· Your main function.
If you follow my recommendations your program’s layout would look something like this:
Also there is an example of the output
Trending now
This is a popular solution!
Step by step
Solved in 3 steps with 5 images