sbn.cassigment/work1/single.c

57 lines
999 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#include "stdio.h"
#include "stdlib.h"
struct person_tag
{
char name[20];
char id[10];
};
struct course_tag
{
char course_name[20];
int no_of_units;
int marks[4];
float avg;
};
struct student_tag
{
struct person_tag student_info;
struct course_tag course_info;
struct student_tag *next;
};
// core functions
void display_students();
void search_student();
void find_maximum();
void find_failed();
void update_file();
void read_file();
void quite();
// util functions
void display_menu();
int main(void)
{
// varibales
int selected;
printf("Welcome!\n");
display_menu();
printf("\nGoodbye!");
}
void display_menu()
{
printf("(1) Display students details\n");
printf("(2) Search for a students mark\n");
printf("(3) Find the details of student with the largest average\n");
printf("(4) Find the details of failed students\n");
printf("(5) Add new student to the record\n");
printf("(6) Quit program\n");
}