Question: Please help by showing me how this program is done in c. The beginning of Student_records.h is shown. Your task is to create student database.
Please help by showing me how this program is done in c. The beginning of Student_records.h is shown.



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__ */ 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
Get step-by-step solutions from verified subject matter experts
