College DBMS Report
College DBMS Report
Batch (2018-2021)
Submitted by
                       June 2021
                           CANDIDATE’S DECLARATION
I hereby certify that the work presented in this project report entitled “College Information
Management System” in partial fulfilment of the requirements for the award of the degree of
Bachelors in Computer Applications is a bonafide work carried out by me during the period of
January 2021 to June 2021 under the supervision of my professors, Department of Computer
Application, Graphic Era Deemed to be University, Dehradun, India.
This work has not been submitted elsewhere for the award of a degree/diploma/certificate.
                                                                        Manoj Pathak
                                                                      Name of Candidate
This is to certify that the above mentioned statement in the candidate’s declaration is correct to
the best of my knowledge.
                                                           XXXXXXX
          Date: XXXXXXXXX                               Name and Signature of Guide
                                               HOD
                            Acknowledgement
Every project begins with an idea and materializes with concrete efforts. In the
beginning I would like to thank the almighty God Who gave the strength and
capabilities to work on this project and complete it successfully.
I would like to express my profound gratitude to Dr. Varsha Mittal, Professor,
Department of Computer Science, for their immense support, valuable guidance
during this project.
Manoj Pathak
                                                             Student Name
                              CERTIFICATE OF ORIGINALITY
This is to certify that the project report entitled   College Information Management System            .
submitted to Graphic Era University, Dehradun in partial fulfilment of the requirement for the award
of the degree of Bachelors in Computer Science, is an authentic and original work carried out by
Mr. Manoj Pathak         with enrollment number       GE-18211529     under my supervision and guidance.
The matter embodied in this project is genuine work done by the student and has not been submitted
whether to this University or to any other University / Institute for the fulfilment of the requirements of
any course of study.
…………………………. ………………………….
Special Note:
                           Table of Content
Declaration ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ i
Acknowledgement ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ii
Abstract ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ iv
1. Introduction
     1.1 Background      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    1
2. Problem Solution
     2.1 Method      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~    3
3. Conclusion ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 9
4. Reference ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 10
administrator of any organization to edit and find out the personal details of a
student and allows the student to keep up to date his profile. It will also facilitate
keeping all the records of student and faculty members such name, father’s name,
phone number. Address, and so on. So all the information about a student will be
It has a simple user interface and is intuitive that the users spend less time in
learning the system. It has efficient security features provide data privacy. In this
application you can add, remove, and update username and password.
This is a simple program written in C program using the file handling concept.
i|Page
                        Chapter 1: Introduction
1.1 Background
Database Technology is referred as a collection of logically related data, and
DBMS as a software system allowing the users to define, create, maintain and
control access to the database.
Database management systems are set up on specific data handling concepts, as the
practice of administrating a database evolves. The earliest databases only handled
individual single pieces of specially formatted data. Today’s more evolved systems
can handle different kinds of less formatted data and tie them together in more
elaborate ways. [1]
This synopsis documentation goes through the whole process of both application
program and database development. It also comprises the development tools have
been utilized for these purposes.
This system should consist of an application program, on one hand, and a database
on the other. The program should perform the basic operations upon the database
as retrieving, inserting, updating and deleting data.
The Interface of the program should be user-friendly, and the program should be as
easy for use as it is possible. Both controls and forms should logically and
functionally be related within the program and fully respond to the structure of the
database.
Another problem is establishing the connections with the database, every time,
when a query is needed to be performed upon it. Exception-handling should also
be taken into an account during the system’s development due to eventual
exceptions that may occur.
1.4 Overview:
The next chapter and its subsections will turn the attention to the method for
resolving the problem, the programming environments used for developing the
system and the implementation of the operations performed upon the database.
2|Page
                    Chapter 2: Problem Solution
This chapter involves some subsections that concern the basic scheme of resolving
the given task and comprise both the methods and tools of its development as well.
2.1 Method
At the very start of the project, I proceeded to a decision to carry out the
development of my task into the following steps:
3. Database design.
6. Testing.
The given task concerns a small organization. I decided to use the file handling
concept as a Database Management System and C language as a programming
language for developing my project.
So far the operations using C program are done on a prompt / terminal which is not
stored anywhere. But in the software industry, most of the programs are written to
store the information fetched from the program. One such way is to store the
3|Page
fetched information in a file. Different operations that can be performed on a file
are: [4]
2.3 Functions
There are various function involved while using College Database Management
System.
    Add Record: Using this function you can add the details of students and
     faculty members.
    Remove Record: Using this function you can remove the details of students
     and faculty members.
    Modify Record: Using this function you can also modify the details of
     students and faculty members.
    Search Record: Using this function you can search the record of the student
     and faculty members.
4|Page
   Print All Records: Using this function you can find the details of all the
    students and faculty members available in database.
Basic Flow:
           The application asks the administrator for the username and password.
           The administrator enters the information.
           The application validates and then verifies the details and sends it to
           admin page.
           The administrator now given access to use application for performing
           task(s).
Alternative Flow:
5|Page
    b. Add student/faculty member information.
Basic Flow:
6|Page
    c. Modification of Student/ Faculty Member Information.
Basic Flow:
Basic Flow:
Chapter 3: Conclusion
8|Page
In this report, an information system development has been presented. It was
emphasized on the basic steps, consequently taken during the project development
This report’s content comprises the whole task solution, starting from the
programming environment have been selected, going through the design, the
As a future work, some additional stuff could be implemented and integrated into
4. Reference
9|Page
[1]. https://www.techopedia.com/definition/24361/database-management-systems-
dbms
[2]. http://lnu.diva-portal.org/smash/get/diva2:204828/FULLTEXT01.pdf
[3]. https://www.geeksforgeeks.org/c-programming-language/
[4]. https://www.geeksforgeeks.org/basics-file-handling-c/
10 | P a g e
5. Source Code
#include<stdio.h>
#include<conio.h>
#include<stdlib.h>
#include<string.h>
#include<math.h>
struct authentication
char username[20];
char password[10];
};
struct stud
char name[50];
char f_name[50];
char roll[50];
char address[500];
char contact[20];
char branch_year[50];
float sgpa[9];
float cgpa;
};
struct faculty
{
11 | P a g e
      char name[50];
char f_name[50];
char id[50];
char address[500];
char contact[20];
char branch[50];
} ;
void printHead();
void printLast();
void loading_screen();
void information();
void thanks();
printf("\e[01;97m");
printChar('\xdb',120);
printf("\n");
printChar('=',120);
printf("\n");
printChar('=',120);
printf("\n");
printChar('\xdb',120);
printf("\033[0m");
while(n--)
printf("%c",ch);
void printLast()
printf("\e[1;97m");
printf("\n\n");
printChar('=',120);
printf("\n");
    printChar('\xdb',120);
13 | P a g e
    printf("\n");
printChar('=',120);
printf("\033[0m");
system("cls");
printHead();
fseek(pas,0,SEEK_END);
printf("\033[01;36m");
printf("\033[01;33m");
scanf("%s",log.username);
scanf("%s",log.password);
printf("\033[1;32m");
printf("\033[0m");
printLast();
getch();
fwrite(&log,sizeof(log),1,pas);
14 | P a g e
    fflush(stdin);
fclose(pas);
int x=0;
char user[20];
char pass[10];
while(x!=3)
system("cls");
printHead();
printf("\e[01;36m");
printf("\n\n\t\t\t\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
printf("\n\t\t\t\t ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
printf("\033[01;33m");
scanf("%s",&user);
scanf("%s",&pass);
printf("\033[0m");
rewind(pas);
         while(fread(&log,sizeof(log),1,pas)==1)
15 | P a g e
         {
printf("\033[1;32m");
printf("\033[0m");
printf("\e[1;97m");
printf("\n\n\n\n");
printChar('=',120);
printf("\n");
printChar('\xdb',120);
printf("\n");
printChar('=',120);
printf("\033[0m");
getch();
fclose(pas);
return 1;
if(strcmp(user,log.username)!=0 || strcmp(pass,log.password)!=0)
printf("\033[1;31m");
printf("\033[0m");
x++;
printf("\e[1;97m");
printf("\n\n\n\n");
         printChar('=',120);
16 | P a g e
         printf("\n");
printChar('\xdb',120);
printf("\n");
printChar('=',120);
printf("\033[0m");
getch();
if(x==3)
fclose(pas);
int flag=1;
while(flag==1)
struct stud s;
struct faculty f;
char x;
char a='Y';
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[01;33m");
17 | P a g e
         printf("\n\n\t\t\t\t PRESS[3]--------> RETURN TO MAIN MENU");
printf("\033[1;32m");
scanf("%d",&x);
printf("\033[0m");
switch(x)
system("cls");
printHead();
fseek(fp1,0,SEEK_END);
printf("\033[01;36m");
printf("\033[01;33m");
fflush(stdin);
fgets(s.name,50,stdin);
s.name[strlen(s.name)-1]='\0';
fflush(stdin);
fgets(s.f_name,50,stdin);
s.f_name[strlen(s.f_name)-1]='\0';
fflush(stdin);
fgets(s.roll,50,stdin);
s.roll[strlen(s.roll)-1]='\0';
18 | P a g e
               printf("\n\t\t\t Enter Address: ");
fflush(stdin);
fgets(s.address,500,stdin);
s.address[strlen(s.address)-1]='\0';
fflush(stdin);
fgets(s.contact,20,stdin);
s.contact[strlen(s.contact)-1]='\0';
fflush(stdin);
fgets(s.branch_year,50,stdin);
s.branch_year[strlen(s.branch_year)-1]='\0';
float cgpa=0.0;
float sgpano=0.0;
for(int i=0;i<8;i++)
scanf("%f",&s.sgpa[i]);
cgpa+=s.sgpa[i];
if(s.sgpa[i]!=0.0)
sgpano++;
cgpa/=sgpano;
s.cgpa=cgpa;
               printf("\033[0m");
19 | P a g e
                           fwrite(&s,sizeof(s),1,fp1);
printf("\033[1;32m");
printf("\033[0m");
fflush(stdin);
printLast();
a=getch();
flag=0;
break;
system("cls");
printHead();
fseek(fp2,0,SEEK_END);
printf("\033[01;36m");
printf("\033[01;33m");
fflush(stdin);
fgets(f.name,50,stdin);
f.name[strlen(f.name)-1]='\0';
fflush(stdin);
fgets(f.f_name,50,stdin);
20 | P a g e
                        f.f_name[strlen(f.f_name)-1]='\0';
fflush(stdin);
fgets(f.id,50,stdin);
f.id[strlen(f.id)-1]='\0';
fflush(stdin);
fgets(f.address,500,stdin);
f.address[strlen(f.address)-1]='\0';
fflush(stdin);
fgets(f.contact,20,stdin);
f.contact[strlen(f.contact)-1]='\0';
fflush(stdin);
fgets(f.branch,50,stdin);
f.branch[strlen(f.branch)-1]='\0';
fwrite(&f,sizeof(f),1,fp2);
printf("\033[1;32m");
fflush(stdin);
printLast();
a=getch();
21 | P a g e
                       flag=0;
break;
case 3: flag=0;
break;
default:flag=1;
printf("\033[1;31m");
printf("\033[0m");
printLast();
getch();
break;
struct stud s;
char tempRoll[30];
int flag=0;
FILE *ft;
system("cls");
printHead();
ft=fopen("temp.txt","w+");
22 | P a g e
    printf("\033[01;36m");
printf("\033[01;33m");
scanf("%s",&tempRoll);
rewind(fp);
while((fread(&s,sizeof(s),1,fp))==1)
if(strcmp(s.roll,tempRoll)==0)
system("cls");
printHead();
printf("\033[1;32m");
flag=1;
sleep(2);
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[1;31m");
23 | P a g e
               printf("\033[0m");
getch();
printf("\033[1;32m");
printf("\033[0m");
continue;
fwrite(&s,sizeof(s),1,ft);
fclose(fp);
fclose(ft);
remove("StudentInfo.txt");
rename("temp.txt","StudentInfo.txt");
if(flag==0)
system("cls");
printHead();
printf("\033[1;31m");
printf("\033[0m");
getch();
return fp;
24 | P a g e
//~~~~~~~~~~~~~~~~FUNCTION THAT WILL REMOVE FACULTY MEMBER INFORMATION FROM
DATABASE~~~~~~~~~~~~~~~
struct faculty f;
char tempRoll[30];
int flag=0;
FILE *ft;
system("cls");
printHead();
ft=fopen("temp.txt","w+");
printf("\033[01;36m");
printf("\033[01;33m");
scanf("%s",&tempRoll);
rewind(fp);
while((fread(&f,sizeof(f),1,fp))==1)
if(strcmp(f.id,tempRoll)==0)
system("cls");
printHead();
printf("\033[1;32m");
25 | P a g e
               printf("\n\n\n\t\t\t SUCCESS! RECORD FOUND!");
flag=1;
sleep(2);
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[1;31m");
printf("\033[0m");
getch();
printf("\033[1;32m");
printf("\033[0m");
continue;
fwrite(&f,sizeof(f),1,ft);
fclose(fp);
fclose(ft);
remove("facultyInfo.txt");
    rename("temp.txt","facultyInfo.txt");
26 | P a g e
    if(flag==0)
system("cls");
printHead();
printf("\033[1;31m");
printf("\033[0m");
printLast();
getch();
return fp;
struct stud s;
int flag=0;
char tempRoll[30];
char a='Y';
while(a=='Y' || a=='y')
system("cls");
printHead();
printf("\033[01;36m");
27 | P a g e
        printf("\n\n\n\t\t\t~~~~~~~~~~~~~~~~~~~~~~~~~~~ STUDENT RECORD MODIFICATION PAGE
~~~~~~~~~~~~~~~~~~~~~~~~~~~");
printf("\033[01;33m");
scanf("%s",tempRoll);
fseek(fp,0,SEEK_SET);
while((fread(&s,sizeof(s),1,fp))==1)
if(strcmp(s.roll,tempRoll)==0)
flag=1;
break;
else
flag=0;
if(flag==1)
system("cls");
printHead();
printf("\033[1;32m");
flag=1;
sleep(2);
system("cls");
printHead();
28 | P a g e
               printf("\033[01;36m");
printf("\033[1;32m");
for(int l=0;l<8;l++)
printf("|%.2f|",s.sgpa[l]);
printf("\033[0m");
getch();
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[01;33m");
fflush(stdin);
fgets(s.name,50,stdin);
s.name[strlen(s.name)-1]='\0';
29 | P a g e
               printf("\n\t\t\t Enter Father's Name: ");
fflush(stdin);
fgets(s.f_name,50,stdin);
s.f_name[strlen(s.f_name)-1]='\0';
fflush(stdin);
fgets(s.roll,50,stdin);
s.roll[strlen(s.roll)-1]='\0';
fflush(stdin);
fgets(s.address,500,stdin);
s.address[strlen(s.address)-1]='\0';
fflush(stdin);
fgets(s.contact,20,stdin);
s.contact[strlen(s.contact)-1]='\0';
fflush(stdin);
fgets(s.branch_year,50,stdin);
s.branch_year[strlen(s.branch_year)-1]='\0';
float cgpa=0.0;
float sgpano=0.0;
for(int i=0;i<8;i++)
cgpa+=s.sgpa[i];
if(s.sgpa[i]!=0.0)
sgpano++;
cgpa/=sgpano;
s.cgpa=cgpa;
printf("\033[0m");
fseek(fp,-760,SEEK_CUR);
fwrite(&s,sizeof(s),1,fp);
else
system("cls");
printHead();
printf("\033[1;31m");
printf("\033[0m");
printf("\033[1;32m");
printf("\033[0m");
printLast();
a=getch();
31 | P a g e
//~~~~~~~~~~~~~~~~FUNCTION THAT WILL MODIFY FACULTY MEMBER INFORMATION IN
DATABASE~~~~~~~~~~~~~~~
struct faculty f;
char tempRoll[30];
char a='Y';
int flag=0;
while(a=='Y' || a=='y')
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[01;33m");
scanf("%s",&tempRoll);
rewind(fp);
while((fread(&f,sizeof(f),1,fp))==1)
if(strcmp(f.id,tempRoll)==0)
flag=1;
break;
else
32 | P a g e
                   flag=0;
if(flag==1)
system("cls");
printHead();
printf("\033[1;32m");
flag=1;
sleep(2);
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[1;32m");
printf("\033[0m");
getch();
system("cls");
printHead();
33 | P a g e
               printf("\033[01;36m");
printf("\033[01;33m");
fflush(stdin);
fgets(f.name,50,stdin);
f.name[strlen(f.name)-1]='\0';
fflush(stdin);
fgets(f.f_name,50,stdin);
f.f_name[strlen(f.f_name)-1]='\0';
fflush(stdin);
fgets(f.id,50,stdin);
f.id[strlen(f.id)-1]='\0';
fflush(stdin);
fgets(f.address,500,stdin);
f.address[strlen(f.address)-1]='\0';
fflush(stdin);
fgets(f.contact,20,stdin);
f.contact[strlen(f.contact)-1]='\0';
fflush(stdin);
34 | P a g e
                fgets(f.branch,50,stdin);
f.branch[strlen(f.branch)-1]='\0';
fseek(fp,-720,SEEK_CUR);
fwrite(&f,sizeof(f),1,fp);
else
system("cls");
printHead();
printf("\033[1;31m");
printf("\033[0m");
printf("\033[1;32m");
printf("\033[0m");
printLast();
a=getch();
system("cls");
printHead();
struct stud s;
35 | P a g e
    printf("\033[01;36m");
printf("\033[0m");
rewind(fp);
while(fread(&s,sizeof(s),1,fp)==1)
printf("\033[01;33m");
for(int i=0;i<8;i++)
printf("|%.2f|",s.sgpa[i]);
printf("\033[0m");
printLast();
sleep(1);
printLast();
getch();
36 | P a g e
//~~~~~~~~~~~~~~~~FUNCTION THAT WILL DISPLAY ALL FACULTY MEMBER INFORMATION PRESENT IN
DATABASE~~~~~~~~~~~~~~~
system("cls");
printHead();
struct faculty f;
printf("\033[01;36m");
printf("\033[0m");
rewind(fp);
while(fread(&f,sizeof(f),1,fp)==1)
printf("\033[01;33m");
printf("\033[0m");
printLast();
sleep(1);
printLast();
37 | P a g e
    getch();
int flag;
struct stud s;
char tempRoll[30];
char a='Y';
while(a=='Y' || a=='y')
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[01;33m");
scanf("%s",&tempRoll);
fseek(fp,0,SEEK_SET);
while((fread(&s,sizeof(s),1,fp))==1)
if(strcmp(s.roll,tempRoll)==0)
flag=1;
38 | P a g e
                   break;
if(flag==1)
system("cls");
printHead();
printf("\033[1;32m");
flag=1;
sleep(2);
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[1;33m");
for(int i=0;i<8;i++)
printf("|%.2f|",s.sgpa[i]);
39 | P a g e
         else
system("cls");
printHead();
printf("\033[1;31m");
printf("\033[0m");
printf("\033[1;32m");
printf("\033[0m");
printLast();
a=getch();
int flag;
struct faculty f;
char tempRoll[30];
char a='Y';
while(a=='Y' || a=='y')
system("cls");
40 | P a g e
         printHead();
printf("\033[01;36m");
printf("\033[01;33m");
scanf("%s",&tempRoll);
rewind(fp);
while((fread(&f,sizeof(f),1,fp))==1)
if(strcmp(f.id,tempRoll)==0)
flag=1;
break;
if(flag==1)
system("cls");
printHead();
printf("\033[1;32m");
flag=1;
sleep(2);
system("cls");
41 | P a g e
                  printHead();
printf("\033[01;36m");
printf("\033[1;33m");
else
system("cls");
printHead();
printf("\033[1;31m");
printf("\033[0m");
printf("\033[1;32m");
printf("\033[0m");
printLast();
a=getch();
42 | P a g e
//~~~~~~~~~~~~~~~~FUNCTION THAT UPDATE USERNAME AND PASSWORD REGISTERED IN
DATABASE~~~~~~~~~~~~~~~
system("cls");
printHead();
char user[30];
char pass[30];
int flag;
struct authentication p;
printf("\033[01;36m");
printf("\033[01;33m");
scanf("%s",&user);
scanf("%s",&pass);
rewind(pas);
while((fread(&p,sizeof(p),1,pas))==1)
flag=1;
break;
43 | P a g e
    if(flag==1)
system("cls");
printHead();
fseek(pas,-sizeof(p),SEEK_CUR);
printf("\033[1;32m");
flag=1;
sleep(2);
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[01;33m");
scanf("%s",p.username);
scanf("%s",p.password);
fwrite(&p,sizeof(p),1,pas);
printf("\033[1;32m");
printf("\033[0m");
44 | P a g e
    else
system("cls");
printHead();
printf("\033[1;31m");
printf("\033[0m");
getch();
fclose(pas);
struct authentication p;
int siz=sizeof(p);
char user[30],pass[30];
int flag;
FILE *ft;
char a='Y';
while(a=='Y' || a=='y')
system("cls");
printHead();
ft=fopen("temp.txt","w+");
45 | P a g e
         printf("\033[01;36m");
printf("\033[01;33m");
scanf("%s",&user);
scanf("%s",&pass);
rewind(pas);
while((fread(&p,siz,1,pas))==1)
flag=1;
printf("\033[1;32m");
flag=1;
sleep(2);
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[1;31m");
printf("\033[0m");
getch();
46 | P a g e
                    printf("\033[1;32m");
printf("\033[0m");
continue;
fwrite(&p,siz,1,ft);
fclose(pas);
fclose(ft);
remove("password.txt");
rename("temp.txt","password.txt");
if((pas=fopen("password.txt","rb+"))==NULL)
return NULL;
if(flag==1)
else
system("cls");
printHead();
printf("\033[1;31m");
47 | P a g e
               printf("\033[0m");
a=getch();
return pas;
void loading_screen()
for(int i=1;i<=10;i++)
system("cls");
printHead();
printf("\033[01;33m");
printf("\n\n\t\t\t\t\t\t");
printf("\033[01;36m");
printChar('\xdb',2*i);
if(i!=10)
printf("\033[1;32m");
printf("\n\n\n\n\n\t\t\t\t\t\tPROGRAM IS LOADING......");
printf("\033[0m");
printf("\e[1;97m");
printf("\n\n\n\n");
printChar('=',120);
printf("\n");
printChar('\xdb',120);
               printf("\n");
48 | P a g e
               printChar('=',120);
printf("\033[0m");
sleep(1);
printf("\033[1;32m");
printf("\n\n\n\n\n\t\t\t\t\t\tPROGRAM LOADED......");
printf("\033[0m");
printf("\e[1;97m");
printf("\n\n\n\n");
printChar('=',120);
printf("\n");
printChar('\xdb',120);
printf("\n");
printChar('=',120);
printf("\033[0m");
getch();
void information()
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[1;32m");
49 | P a g e
    printf("\n\n\t\t\t\t     MINI PROJECT ON COLLEGE DATABASE MANAGEMENT SYSTEM");
printf("\033[01;33m");
printf("\033[0m");
getch();
void thanks()
system("cls");
printHead();
printf("\033[01;36m");
printf("\033[1;32m");
printf("\033[01;33m");
printf("\033[0m");
sleep(2);
int main(void)
50 | P a g e
{
information();
int acc;
int flag1,flag2,flag3,flag4;
FILE *fp;
if((fp=fopen("password.txt","r+"))==NULL)
if((fp=fopen("password.txt","w+"))==NULL)
acc=login(fp);
fclose(fp);
if(acc==1)
int option;
loading_screen();
while(1)
if((fp1=fopen("StudentInfo.txt","r+"))==NULL)
if((fp1=fopen("StudentInfo.txt","w+"))==NULL)
               }
51 | P a g e
               if((fp2=fopen("facultyInfo.txt","r+"))==NULL)
if((fp2=fopen("facultyInfo.txt","w+"))==NULL)
if((pas=fopen("password.txt","r+"))==NULL)
if((pas=fopen("password.txt","w+"))==NULL)
system("cls");
printHead();
printf("\e[01;36m");
printf("\033[01;33m");
               printf("\033[1;32m");
52 | P a g e
               printf("\n\n\t\t\t\t ENTER YOUR OPTION: ");
scanf("%d",&option);
printf("\033[0m");
switch(option)
case 0: thanks();
return 0;
break;
case 1: add(fp1,fp2);
break;
case 2: flag1=1;
while(flag1==1)
system("cls");
printHead();
int x;
printf("\033[01;36m");
printf("\033[01;33m");
printf("\033[1;32m");
scanf("%d",&x);
printf("\033[0m");
switch(x)
53 | P a g e
                           {
case 1:fp1=delstud(fp1);
flag1=0;
break;
case 2:fp2=delfacul(fp2);
flag1=0;
break;
case 3:flag1=0;
break;
default:printf("\033[01;31m");
printLast();
printf("\033[0m");
sleep(1);
flag1=1;
break;
break;
case 3: flag2=1;
while(flag2==1)
system("cls");
printHead();
int y;
printf("\033[01;36m");
54 | P a g e
                     printf("\n\n\n\t\t\t\t~~~~~~~~~~~~~~~ RECORD MODIFICATION MENU
~~~~~~~~~~~~~~~");
printf("\033[01;33m");
printf("\033[1;32m");
scanf("%d",&y);
printf("\033[0m");
switch(y)
case 1: modifystud(fp1);
flag2=0;
break;
case 2: modifyfacul(fp2);
flag2=0;
break;
case 3: flag2=0;
break;
default:printf("\033[01;31m");
printLast();
printf("\033[0m");
sleep(1);
flag2=1;
break;
55 | P a g e
                        }
break;
case 4: flag3=1;
while(flag3==1)
system("cls");
printHead();
int z;
printf("\033[01;36m");
printf("\033[01;33m");
printf("\033[1;32m");
scanf("%d",&z);
printf("\033[0m");
switch(z)
case 1: displayListstud(fp1);
flag3=0;
break;
case 2: displayListfacul(fp2);
flag3=0;
break;
case 3: flag3=0;
break;
56 | P a g e
                                   default:printf("\033[01;31m");
printLast();
printf("\033[0m");
sleep(1);
flag2=1;
break;
break;
case 5: flag4=1;
while(flag4==1)
system("cls");
printHead();
int c;
printf("\033[01;36m");
printf("\033[01;33m");
printf("\033[1;32m");
scanf("%d",&c);
printf("\033[0m");
57 | P a g e
                           switch(c)
case 1: searchRecordstud(fp1);
flag4=0;
break;
case 2: searchRecordfacul(fp2);
flag4=0;
break;
case 3: flag4=0;
break;
default:printf("\033[01;31m");
printLast();
printf("\033[0m");
sleep(1);
flag4=1;
break;
break;
case 6:update_user_pass(pas);
break;
case 7:pass(pas);
break;
case 8:pas=deletepass(pas);
break;
default:system("cls");
printHead();
58 | P a g e
                              printf("\033[1;31m");
printf("\033[0m");
printLast();
sleep(2);
break;
fclose(fp1);
fclose(fp2);
fclose(pas);
else
system("cls");
printHead();
printf("\033[1;32m");
sleep(3);
printf("\033[0m");
for(int i=5;i>0;i--)
system("cls");
printHead();
printf("\033[1;32m");
printf("\033[0m");
printLast();
sleep(1);
           }
59 | P a g e
    }
60 | P a g e