Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Evaluation Question: Write a C program that includes the following operations: a. In your program define a global data structure with name person as follows:
Evaluation Question: Write a C program that includes the following operations: a. In your program define a global data structure with name person as follows: The members of the structure will be name, surname and age. b. Create an array of 5 Person in your main function. C. Create a function called add() - This function takes the array of Person structure defined and initialized in part (b) and asks the user to enter the details of a person and adds this person to the array. Here is the function prototype: void add(struct Person d. Create a function called oldest() - This function will take the array and finds and prints the name and the surname of the oldest person. Assume that the age of each person is different. Here is the function prototype: void oldest (struct Person p[5]); A sample run is as follows: p[5]); enter first name of person 1:Nehir anter surname of person 1:Gurses enter age of person 1:9 enter first name of person 2: Irmak enter surname of person 2:Kalkan enter age of person 2:10 enter first name of person 3:Lavin enter surname of person 3:Unal enter age of person 3:5 enter first name of person 4:Dilara enter surname of person 4:Onen enter age of person 4:15 enter first name of person 5:Aren anter surname of person 5:Gezgin enter age of person 5:3 oldest person name: Dilara, surname: Onen process returned @ (exe) execution time : 56.022 s Press any key to continue. Mark(out of 100) Grading Policy 1: Item: Declaring the structure Declaring the array Function add() Function oldest() Mark (out of 100): 15 15 35 35
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started