Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am having an issue understanding the structs and functions. Please help me by showing them. how they look. Thank you. Your task is to

I am having an issue understanding the structs and functions. Please help me by showing them. how they look. Thank you.

image text in transcribedimage text in transcribedimage text in transcribed

Your task is to create student database. The header file student_record.h should contain: all function declarations used in your project structure used in your project In the file student_record.c, you should implement the functions declared in student_record.h. The main.c file is the main file for your project and contains the function: main() To represent each student, you will need to create a structure (use struct Student). This structure should store information like: full name address date of birth email address contact number Choose an appropriate datatype for each fields of the structure. To represent the student database, create a structure (struct Database) that will contain a pointer to an array of struct Student as well as the size of this array (i.e. the number of student in the database). To print each student's information, you need to create a function print_student() that takes a pointer to a Student structure and prints its detail on the standard output. You should be able to print an entire database as well. Create a function print_database() that takes a pointer to an address book and print its details on the standard output. Make use of the function print_student() to print each student detail. To create the database, use the function create_database(). This function should: create dynamically an empty database, read information about student from the user in a loop, dynamically allocate an array of struct Student of the correct size and store the pointer of it in the database, Return the database Before you terminate the program, you should also destroy the struct Database. For this create the function destroy_database(). #ifndef _STUDENT_RECORD_H__ #define STUDENT_RECORD_H__ /* Add your structures here */ /* Function declarations. Do not modify! Implement those functions in student_record.c */ void print_student (const Student* student); void print_database(const Database* student_record); Database* create_database(void); void destroy_database (Database* student_record); #endif /* _STUDENT_RECORD_H__ */

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

Sams Teach Yourself Beginning Databases In 24 Hours

Authors: Ryan Stephens, Ron Plew

1st Edition

067232492X, 978-0672324925

Students also viewed these Databases questions