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 #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) тain function ask how many passports create array of structures iterate through each structure and get information iterate through each structure and print out information

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

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

Please without using #include<stdlib.h>, just with #include<stdio.h> please

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
Transcribed Image Text: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
#include <stdio.h>
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)
тain function
ask how many passports
create array of structures
iterate through each structure and get information
iterate through each structure and print out information
Transcribed Image Text:#include <stdio.h> 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) тain function ask how many passports create array of structures iterate through each structure and get information iterate through each structure and print out information
Expert Solution
steps

Step by step

Solved in 3 steps with 1 images

Blurred answer
Knowledge Booster
Array
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education