Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions