Professional Documents
Culture Documents
ABSTRACT
In this project many user defined functions and strutures are used.
• struct fee
• fopen()
• fread()
• fwrite()
• fclose()
• switch()
• fopen( ) : fopen function opens the file specified by filename and associates
• Fread( ) : The fread function reads the block of data from the stream.
Here, switch ( ) used to choose any one of choices like student details,
Display record , Deposite fee, Pending fee ,Delete record ,And exiting.
INTRODUCTION
A Fee Management System is used as task management software that automates
collecting fees and generating fee receipts. Fee management software allows
parents and students to make online payments from anywhere at any time. All
every fee received and due. The best thing about the use of Fee Management
Software in place of direct human involvement is that the process is much easier.
The main advantage of this is that the time required for the operation is reduced.
Using this software, you can easily keep a real-time track of fee payments and
SYSTEM REQUIREMENTS
The requirements for the program to run or for the code to be in effect are basic
and can be found on any simple computer. However some of the essential
HARDWARE:
The hardware required for the program to run is same as the hardware that can be
Software platform:
Language: C Language
SOURCE CODE
//Student fee record
#include<stdio.h>
#include<conio.h>
void main()
struct fee
int r_no;
char name[40];
char add[40];
char f_name[40];
char stream[40];
};
struct fee f;
char stream[40];
int r_no;
fp=fopen("FEE2.DAT","rb+");
if(fp==NULL)
fp=fopen("FEE2.DAT", "wb+");
if(fp==NULL)
exit(1);
recsize = sizeof(f);
while(1)
clrscr();
gotoxy(30,10);
gotoxy(30,12);
gotoxy(30,14);
gotoxy(30,16);
gotoxy(30,18);
gotoxy(30,20);
printf("0.Exit");
gotoxy(30,22);
printf("Your choice");
fflush(stdin);
choice = getche();
switch(choice)
case 'l':
fseek(fp,0,SEEK_END);
another= 'Y';
printf("\nEnter Name");
printf("\nEnter Roll_no");
scanf("%d", &f.r_no);
scanf("%s", f.name);
printf("\nEnter Address");
scanf("%s", f.add);
scanf("%s",f.f_name);
scanf("%ld", &f.d_fee);
printf("\nEnter Stream");
scanf("%s", f.stream);
fflush(stdin);
another=getche();
break;
case '2':
clrscr();
rewind(fp);
f.d_fee,total);
getch();
break;
case '3':
another='Y';
while(another='Y')
{
scanf("%d",&r_no);
scanf("%s",stream);
rewind(fp);
flag=0;
if((f.r_no==r_no)&&(strcmp(f.stream, stream)==0))
if(f.d_fee<=total)
flag=1;
scanf("%ld",&amount);
f.d_fee=f.d_fee + amount;
fwrite(&f,recsize, 1,fp);
break;
}}
if(flag==0)
getch();
another=getche();
break;
case '4':
another='Y';
while(another='Y')
scanf("%d",&r_no);
scanf("%s",stream);
rewind(fp);
flag=0;
flag=1;
if((f.r_no==r_no)&&(strcmp(f.stream,stream)==0))
pending=total-f.d_fee;
f.d_fee=f.d_fee+pending;
getch();
if(flag==0)
fflush(stdin);
another=getche();
break;
case '5':
another='Y';
while(another=='Y')
scanf("%d",&r_no);
ft=fopen("TEMP.DAT", "wb");
rewind(fp);
if(f.r_no!=r_no)
10
fclose(fp);
fclose(ft);
remove("FEE2.DAT");
rename("TEMP.DAT", "FEE2.DAT");
fp=fopen("FEE2.DAT", "rb+");
fflush(stdin);
another = getche();
}
break;
case '0':
fclose(fp);
exit0();
}}