Question: write a C program that combines pointers, arrays, structures, and functions. We would like to create a dynamic array of N persons. Each person is

write a C program that combines pointers, arrays, structures, and functions. We would like to create a dynamic array of N persons. Each person is described by the following fields:

- Name as a string of character.

- as an integer

a) Your program should ask the user for an array size, N, create the array of N persons.

b) Once you create your array, you need to create a function, called getoldest, which takes an array of persons and returns the oldest person in the array.

c) You main function needs to call getoldest function with your array and its size and prints the returned value by getoldest.

Notes:

You need to use library to get the INT_MIN value. This is used to initialize the value that will hold the maximum value in getoldest function.

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!