Question: 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:

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!