Structures (structs)
here we find the used structures in project
1. Struct Definitition module :
module :The module structure represents a module of a student's academic record.
It contains information such as the module name, coefficient, and the student's grade (note) in that module.
syntax:
typedef struct {
char nom_module[MAX_NAME_LEN];
int coefficient;
float note;
} module;
Members:
nom_module: An array of characters representing the name of the module. The maximum length is defined byMAX_NAME_LENsee in (#used macros)coefficient: An integer representing the coefficient of the module.note: A floating-point value representing the student's grade in the module.
2. Struct Definitition student :
student :Syntax:
typedef struct {
long long int id;
char nom[MAX_NAME_LEN];
char prenom[MAX_NAME_LEN];
char adresse[MAX_ADDRESS_LEN];
char email[MAX_EMAIL_LEN];
int age;
float moyenne;
module modules[MAX_MODULES];
int nb_modules;
} student;Members:
id: A long long integer representing the unique ID of the student.nom: An array of characters representing the last name of the student. The maximum length is defined byMAX_NAME_LEN. see in (#used macros)prenom: An array of characters representing the first name of the student. The maximum length is defined byMAX_NAME_LEN. see in (#used macros)adresse: An array of characters representing the home address of the student. The maximum length is defined byMAX_ADDRESS_LEN. see in (#used macros)email: An array of characters representing the email address of the student. The maximum length is defined byMAX_EMAIL_LEN. see in (#used macros)age: An integer representing the age of the student.moyenne: A floating-point value representing the average grade of the student.modules: An array ofmodulestructures representing the list of modules for the student. The maximum number of modules is defined byMAX_MODULES. see in (#used macros)nb_modules: An integer representing the number of modules for the student.
Last updated
Was this helpful?