You are on page 1of 54

TERM PAPER

RESULT MANAGEMENT
SYSTEM
CSE101

(A short term report on result management system)

SUBMITTED TO:
Mr. BALRAJ KUMAR

(Lecturer) SUBMITTED BY:-


RIGZIN ANGMO & VAIBHAV

ROLL No. :- R236A25 & A23


Regd. No. :- 10807542 & 10805117

CLASS:- B.Tech-M.TECH(MBA)(IT)

SUBJECT:- FOUNDATION

OF COMPUTER
ACKNOWLEDGEMENT
To many individuals I am indebted good
counsel and assistance in various ways in this
respect one of my sincerest thanks to “Mr.
BALRAJ KUMAR” of Lovely Professional
University, Phagwara, for their kind
cooperation and able guidance.
I owe a deep sense of indebtness of my
pureness that have been source of inspiration
in every work of my life.
I deeply express our indebtness and thanks to
all my faculty member of B.TECH (IT-M.Tech,
MBA) for their in valuable, guidance which
enable me to bring out this project in a
presentable manner.
CONTENTS

INTRODUCTION

INTRODUCTION TO ‘C’ LANGUAGE

PROPOSED SYSTEM

REQUIRMENT ANALYSIS

SOURCE CODE

TESTING

FUTURE OF THE PROJECT


INTRODUCTION

The program result management system is for to create a result


of student, to modify the result of student, to delete the result of
student, to create the 1st and 2nd merit list in between all of
student.

It is a very good program because we can simply enter any


subject’s marks. We can simply modify.

We can simply search the student details by entering the roll


number. we can generate the merit list on the basis of one
subject. And we can generate merit list on the basis of total
marks.

So it is very essential project to generate result and merit list.


INTRODUCTION TO C

LANGUAGE

C is a popular general purpose programming language. C


language has been designed and developed by DENNIS RITCHIE
at BELL Laboratories in 1972.It is an offspring of the “Basic
combined programming language” called ‘B’ developed in the
year 1960 at Cambridge university.

C language is a middle level computer language .It does not


mean that C is not powerful and robust for writing programs like
in FORTRAN, PASCAL etc. It is not troublesome like assembly
level language .It combines the features of high level language
and functionally like assembly language. It reduces the gap
between high level language and low- level language that is
why it is known as middle level language. It is well suited for
writing both application software and system software. This
language is associated closely with UNIX operating system. The
source code for the UNIX operating system is coded in C. C runs
under a number of operating systems including MS.DOS.

C is a structured language. It is similar in many ways to other


structural languages such as Pascal, Fortran etc. A structured
language allows variety of programs in small modules. It is
easy for debugging, testing and maintenance if a language is a
structured one. Structured languages are easier and most of the
developers prefer these languages than the non-structured one
like Basic and Cobol.
PROPOSED SYSTEM

1.DESCRIPTION:-

1.1. Header files


Ex. <stdio.h>,<conio.h> etc.
1.2. File handling
Ex. Fopen,fclose etc.
1.3. Switch case
Ex. Case1,case2.
1.4. Structure
Ex. Struct.
1.5. Function
Ex. Void.
1.6. Pointer
1.7. Ex. *
1.8. Control statement
Ex. And, or,not etc.
1.9. logical statement
Ex. If,ifelse,nestedif etc
2.System requirement:-

Processor Asus
Platform Window XP
Professional
RAM 256 MB
Hard Disk 80 GB
Mouse Optical
Keyboard Multimedia
CD Drive 52.32.52x16x

REQUIREMENT ANALYSIS

HEADER FILES:-

1. <Stdio.h>:-It is a header file, it means standard


input and output,It contains printf and sacnf keyword.
Which are use for input and output.
2. <conio.h>:- It is a header file, it means console
input and output, it contains clrscr(); and getch();
keyword. It is use for clear the screen and to hold the
output screen.
3. <string.h>:-It is use for string input and output.
Is is a function of sort way for converting strings.
4. <dos.h>:-it is use for delay fuction in this
program.
5. <process.h>it is use for exit function in this
program.

1. Fwrite:-it is use for to write a file into a file.

2. Fread:-it is use for to read a file into a file.

3. Fclose:-every open file should close by the key word


fclose.

4. “r”:-it is use for to open a file into read mode.

5. “w”:-it ise use for to open a file into write mode.

6. “a”:-it is use for to open a file into append mode.


FUCTION:-
1. FUCTION NAME:-first of all we have to write the
name of function.

2. FUCTION CALL:-Then we have to call to that


function.

3. FUCTION DEFINATION:-At last we have to


define the function, which operation should be use.

ARRAY:-
1.ARRAY DATA TYPE:-First of all we have to
declare the data type of array.

2. NAME OF ARRAY:-Then we have to named of


array.

3. SIZE OF ARRAY:-We have to declare the size


of array, we have to declare the size of array in[]
brackets.

STRUCTURE:-
We use structure for to make temporary variable.
SWITCH CASE:-It is use for selection. We use
switch case for selection case which we want to
perform at that time.

SOURCE CODE
// INCLUDING ALL THE HEADER FILES //
#include<stdio.h>
#include<conio.h>
#include<string.h>
#include<dos.h>

char grade(long int x,int y);


long int total(int a,int b,int c,int d,int e);
float percent(long int z);
// FUNCTION TO CALCULATE GRADE //
char grade(long int x,int y)
{
if((x*100/y)>74)
return('A');
else
{
if((x*100/y)>60)
return('B');
else
{
if((x*100/y)>33)
return('C');
else
return('E');
}
}
}
// FUNCTION TO CALCULATE TOTAL MARKS //
long int total(int a,int b,int c,int d,int e)
{
int t;
t=(a+b+c+d+e);
return (t);
}
// FUNCTION TO CALCULATE PERCANTAGE //
float percent(long int z)
{
float p=0;
p=(z*100)/410;
return(p);
}
// STRUCTURE TO INPUT DETAILS OF STUDENT //
struct studres
{

int clas;
char s;
int rollno;
char name[30];
char fatername[30];
char teachname[30];
int engmark;
int matmark;
int phymark;
int chemark;
int commark;
int total;
float percentage;

}stdres;

struct temp
{
int roll;
char name[30];
int clas;
char sec;
int total;

}temp;

// ALL THE FUNCTIONS INITIALIZED //


void create();
void add();
void search();
void modify();
void merit();
void merit1();
void delet();

long int total(int a,int b,int c,int d,int e);


float percent(long int z);
int checking(int z, char y, int x);
void menu();

void main()
{ // MAIN PROGRAM STARTS HERE //
clrscr();
gotoxy(20,6);
printf(" R E S U L T M A N A G E M E N T");

gotoxy(10,10);
printf(" CODED BY KALPENDRA SINGH ");

getch();
clrscr();
menu(); // CALLING FUNCTION TO PRINT MENU //

void create()

{ // FUNCTION TO CREATE THE MAIN FILE //


char ans;
FILE *result;
clrscr();
gotoxy(20,6);
printf("WARNING !!! ALL PREVIOUS RECORDS WILL BE DELETED");
gotoxy(10,10);
printf(" DO YOU STILL WANT TO CONTINUE(Y/N):");
scanf("%c",ans);
if(ans != 'N' || ans != 'n')
{
result=fopen("result.txt","w");
fclose(result);
}
menu();
}

void add()

{ // FUNCTION TO ADD DETAILS OF THE STUDENT //

top:

{
int max1=100,max2=70,kar,l,m;
char ch,n;
FILE *result;
clrscr();
printf("CLASS:");
gotoxy (16,1);
printf("SECTION:");
gotoxy(31,1);
printf("ROLL NO:");
gotoxy(47,1);
printf("STUDENT'S NAME:");
gotoxy(1,5);
printf("FATHER NAME:");
gotoxy(45,5);
printf("CLASS TEACHER:");
gotoxy(1,9);
printf("S.NO.");
gotoxy(15,9);
printf("SUBJECT");
gotoxy(30,9);
printf("MARKS");
gotoxy(40,9);
printf("MAXIMUM MARKS");
gotoxy(70,9);
printf("GRADE");
gotoxy(3,11);
printf("1");
gotoxy(15,11);
printf("ENGLISH");
gotoxy(3,13);
printf("2");
gotoxy(15,13);
printf("MATHS");
gotoxy(3,15);
printf("3");
gotoxy(15,15);
printf("PHYSICS");
gotoxy(3,17);
printf("4");
gotoxy(15,17);
printf("CHEMISTRY");
gotoxy(3,19);
printf("5");
gotoxy(15,19);
printf("COMPUTER");
gotoxy(3,25);
printf("6");
gotoxy(15,25);
printf("TOTAL");
gotoxy(3,27);

printf("7");
gotoxy(15,27);
printf("PERCENTAGE");
// getting student information //
gotoxy(8,1);
scanf("%d",&m);
gotoxy(25,1);
n=getchar();
fflush(stdin);
result=fopen("result.txt","w");
gotoxy(40,1);
scanf("%d",&l);
kar=checking(m,n,l);
if(kar==1)
{
fclose(result);
goto top;
}

else
{
stdres.clas=m;
stdres.s=n;
stdres.rollno=l;
}

gotoxy(63,1);
gets(stdres.name);
fflush(stdin);

gotoxy(14,5);
gets(stdres.fatername);
fflush(stdin);
gotoxy(60,5);
gets(stdres.teachname);

gotoxy(47,11); /*marks table*/


printf("100");
gotoxy(32,11);
scanf("%d",&stdres.engmark);
gotoxy(72,11);
printf("%d",grade(stdres.engmark,max1));

gotoxy(47,13);
printf("100");
gotoxy(32,13);
scanf("%d",&stdres.matmark);
gotoxy(72,13);
print("%d",grade(stdres.matmark,max1));

gotoxy(47,15);
printf(" 70");
gotoxy(32,15);
scanf("%d",&stdres.phymark);
gotoxy(72,15);
printf("%d",grade(stdres.phymark,max2));

gotoxy(47,17);
printf(" 70");
gotoxy(32,17);
scanf("%d",stdres.chemark);
gotoxy(72,17);
printf("%d",grade(stdres.chemark,max2));

gotoxy(47,19);
printf(" 70");
gotoxy(32,19);
scanf("%d",stdres.commark);
gotoxy(72,19);
printf("%d",grade(stdres.commark,max2));

gotoxy(47,25);
printf("410");
gotoxy(31,25);

printf("%d%d%d%d
%d",total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,st
dres.commark));

stdres.total=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.che
mark,stdres.commark);

gotoxy(32,27);
stdres.percentage=percent(stdres.total);
printf("%f",stdres.percentage);
gotoxy(80,50);

fwrite(&stdres,sizeof(stdres),1,result);
fclose(result);
getch();
menu();
}
}

int checking(int z, char y, int x)


{ // FUNCTION TO CALCULATE WETHER STUDENT EXISTS //
int suansh=0;
FILE *result;
result=fopen("result.dat","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.clas==z&&stdres.s==y&&stdres.rollno==x)
{
clrscr();
gotoxy(22,25);
printf("ENTRY ALREADY EXISTS");
getch();
suansh=1;
break;
}
fread(&stdres, sizeof(stdres),1,result);
}
return(suansh);
}

void menu()
// FUNCTION THAT PRINTS THE MAIN MENU //
{
int ans;
clrscr();
gotoxy(25,10);
printf("M A I N M E N U");
gotoxy(17,15);
printf("1. Create the Primary Result Register");
gotoxy(17,16);
printf("2. Add Result");
gotoxy(17,17);
printf("3. Modify Result");
gotoxy(17,18);
printf("4. Search Result");
gotoxy(17,19);
printf("5. Delete Result");
gotoxy(17,20);
printf("6. Generate Merit List Grade wise per subject");
gotoxy(17,21);
printf("7. Generate Merit List on basis of Total Marks");
gotoxy(17,22);
printf("8. Exit");

gotoxy(40,25);
printf("Enter Option(1-8):");
scanf("%d",&ans);
// SWITCH USED TO MAKE PROGRAM MENU BASED //
switch(ans)
{
case 1:create();
break;
case 2: add();
break;
case 3: modify();
break;
case 4: search();
break;
case 5: delet();
break;
case 6: merit();
break;
case 7: merit1();
break;
case 8: exit(0);
}

void search()

{ // FUNCTION TO SEARCH A STUDENT //


{
int max1=100,max2=70,roll,flag=0;
char ch;
FILE *result;
clrscr();
gotoxy(23,15);
printf("Enter the Roll No. of the student: ");
scanf("%d",&roll);
result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.rollno==roll)
{
flag=1;
clrscr();
gotoxy(23,25);
printf("RECORD FOUND");
gotoxy(23,27);
printf("PRESS ANY KEY TO CONTINUE ...");
getch();

clrscr();
printf("CLASS:");
gotoxy (16,1);
printf("SECTION:");
gotoxy(31,1);
printf("ROLL NO:");
gotoxy(47,1);
printf("STUDENT'S NAME:");
gotoxy(1,5);
printf("FATHER NAME:");
gotoxy(45,5);
printf("CLASS TEACHER:");
gotoxy(1,9);
printf("S.NO.");
gotoxy(15,9);
printf("SUBJECT");
gotoxy(30,9);
printf("MARKS");
gotoxy(40,9);
printf("MAXIMUM MARKS");
gotoxy(70,9);
printf("GRADE");
gotoxy(3,11);
printf("1");
gotoxy(15,11);
printf("ENGLISH");
gotoxy(3,13);
printf("2");
gotoxy(15,13);
printf("MATHS");
gotoxy(3,15);
printf("3");
gotoxy(15,15);
printf("PHYSICS");
gotoxy(3,17);
printf("4");
gotoxy(15,17);
printf("CHEMISTRY");
gotoxy(3,19);
printf("5");
gotoxy(15,19);
printf("COMPUTER");
gotoxy(3,25);
printf("6");
gotoxy(15,25);
printf("TOTAL");
gotoxy(3,27);
printf("7");
gotoxy(15,27);
printf("PERCENTAGE");
gotoxy(8,1);
printf("%d",stdres.clas); /*printing student information*/
gotoxy(25,1);
printf("%c",stdres.s);
gotoxy(40,1);
printf("%d",stdres.rollno);
gotoxy(63,1);
puts(stdres.name);
fflush(stdout);
gotoxy(14,5);
puts(stdres.fatername);
fflush(stdout);
gotoxy(60,5);
puts(stdres.teachname);

gotoxy(47,11); /*marks table*/


printf("100");
gotoxy(32,11);
printf("%d",stdres.engmark);
gotoxy(72,11);
printf("%c",grade(stdres.engmark,max1));

gotoxy(47,13);
printf("100");
gotoxy(32,13);
printf("%d",stdres.matmark);
gotoxy(72,13);
printf("%c",grade(stdres.matmark,max1));

gotoxy(47,15);
printf(" 70");
gotoxy(32,15);
printf("%d",stdres.phymark);
gotoxy(72,15);
printf("%c",grade(stdres.phymark,max2));

gotoxy(47,17);
printf(" 70");
gotoxy(32,17);
printf("%d",stdres.chemark);
gotoxy(72,17);
printf("%c",grade(stdres.chemark,max2));

gotoxy(47,19);
printf(" 70");
gotoxy(32,19);
printf("%d",stdres.commark);
gotoxy(72,19);
printf("%c",grade(stdres.commark,max2));

gotoxy(47,25);
printf("410");
gotoxy(31,25);

printf("%d%d%d%d
%d",total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,st
dres.commark));

stdres.total=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.che
mark,stdres.commark);

gotoxy(32,27);
stdres.percentage=percent(stdres.total);
printf("%f",stdres.percentage);
gotoxy(80,50);

fclose(result);
getch();
menu();

}
else
fread(&stdres,sizeof(stdres),1,result);

if(flag==0)
{

clrscr();
gotoxy(23,23);
printf("SORRY! The Roll No.=%d does not exist.",roll);
gotoxy(23,25);
printf(" PLEASE! TRY AGAIN.");
fclose(result);
getch();
menu();
}
}
}

void modify()

{ // FUNCTION TO MODIFY STUDENT'S DATA //

int max1=100,max2=70,roll,flag=0,flag2=0;
char ch,z,n;
FILE *result,*tfile;
clrscr();
gotoxy(23,15);
printf("Enter the Roll No. of the student: ");
scan("%d",roll);
result=fopen("result.txt","r");
tfile=fopen("tfile.txt","w");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.rollno==roll)
{
flag=1;
clrscr();
gotoxy(23,25);
printf("RECORD FOUND");
gotoxy(23,27);
printf("PRESS ANY KEY TO CONTINUE ...");
getch();

clrscr();
printf("CLASS:");
gotoxy (16,1);
printf("SECTION:");
gotoxy(31,1);
printf("ROLL NO:");
gotoxy(47,1);
printf("STUDENT'S NAME:");
gotoxy(1,5);
printf("FATHER NAME:");
gotoxy(45,5);
printf("CLASS TEACHER:");
gotoxy(1,9);
printf("S.NO.");
gotoxy(15,9);
printf("SUBJECT");
gotoxy(30,9);
printf("MARKS");
gotoxy(40,9);
printf("MAXIMUM MARKS");
gotoxy(70,9);
printf("GRADE");
gotoxy(3,11);
printf("1");
gotoxy(15,11);
printf("ENGLISH");
gotoxy(3,13);
printf("2");
gotoxy(15,13);
printf("MATHS");
gotoxy(3,15);
printf("3");
gotoxy(15,15);
printf("PHYSICS");
gotoxy(3,17);
printf("4");
gotoxy(15,17);
printf("CHEMISTRY");
gotoxy(3,19);
printf("5");
gotoxy(15,19);
printf("COMPUTER");
gotoxy(3,25);
printf("6");
gotoxy(15,25);
printf("TOTAL");
gotoxy(3,27);
printf("7");
gotoxy(15,27);
printf("PERCENTAGE");

gotoxy(8,1);
printf("%d",stdres.clas); /*printing student information*/
gotoxy(25,1);
printf("%c",stdres.s);
gotoxy(40,1);
printf("%d",stdres.rollno);
gotoxy(63,1);
puts(stdres.name);
fflush(stdout);
gotoxy(14,5);
puts(stdres.fatername);
fflush(stdout);
gotoxy(60,5);
puts(stdres.teachname);

gotoxy(47,11); /*marks table*/


printf("100");
gotoxy(32,11);
printf("%d",stdres.engmark);
gotoxy(72,11);
printf("%c",grade(stdres.engmark,max1));

gotoxy(47,13);
printf("100");
gotoxy(32,13);
printf("%d",stdres.matmark);
gotoxy(72,13);
printf("%c",grade(stdres.matmark,max1));

gotoxy(47,15);
printf(" 70");
gotoxy(32,15);
printf("%d",stdres.phymark);
gotoxy(72,15);
printf("%c",grade(stdres.phymark,max2));

gotoxy(47,17);
printf(" 70");
gotoxy(32,17);
printf("%d",stdres.chemark);
gotoxy(72,17);
printf("%c",grade(stdres.chemark,max2));
gotoxy(47,19);
printf(" 70");
gotoxy(32,19);
printf("%d",stdres.commark);
gotoxy(72,19);
printf("%d",grade(stdres.commark,max2));

gotoxy(47,25);
printf("410");
gotoxy(31,25);

printf("%d%d%d%d
%d",total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,st
dres.commark));stdres.total=total(stdres.engmark,stdres.matmark,stdres.ph
ymark,stdres.chemark,stdres.commark);

gotoxy(32,27);
stdres.percentage=percent(stdres.total);
printf("%f",stdres.percentage);

getch();

gotoxy(32,40);
printf("WOULD YOU LIKE TO MAKE ANY CHANGES");
printf("IF YES .. PRESS 'A' ");
z=getch();
if(z=='a'||z=='A')
{
flag2=1;
clrscr(); /*again printing format for
modification*/
printf("CLASS:");
gotoxy (16,1);
printf("SECTION:");
gotoxy(31,1);
printf("ROLL NO:");
gotoxy(47,1);
printf("STUDENT'S NAME:");
gotoxy(1,5);
printf("FATHER NAME:");
gotoxy(45,5);
printf("CLASS TEACHER:");
gotoxy(1,9);
printf("S.NO.");
gotoxy(15,9);
printf("SUBJECT");
gotoxy(30,9);
printf("MARKS");
gotoxy(40,9);
printf("MAXIMUM MARKS");
gotoxy(70,9);
printf("GRADE");
gotoxy(3,11);
printf("1");
gotoxy(15,11);
printf("ENGLISH");
gotoxy(3,13);
printf("2");
gotoxy(15,13);
printf("MATHS");
gotoxy(3,15);
printf("3");
gotoxy(15,15);
printf("PHYSICS");
gotoxy(3,17);
printf("4");
gotoxy(15,17);
printf("CHEMISTRY");
gotoxy(3,19);
printf("5");
gotoxy(15,19);
printf("COMPUTER");
gotoxy(3,25);
printf("6");
gotoxy(15,25);
printf("TOTAL");
gotoxy(3,27);
printf("7");
gotoxy(15,27);
printf("PERCENTAGE");

gotoxy(8,1);
printf("%d",stdres.clas); /*printing student information*/
gotoxy(25,1);
printf("%c",stdres.s);
gotoxy(40,1);
printf("%d",stdres.rollno);
gotoxy(63,1);

gotoxy(63,1);
gets(stdres.name);
fflush(stdin);

gotoxy(14,5);
gets(stdres.fatername);
fflush(stdin);
gotoxy(60,5);
gets(stdres.teachname);

gotoxy(47,11); /*marks table*/


printf("100");
gotoxy(32,11);
scanf("%d",stdres.engmark);
gotoxy(72,11);
printf("%c",grade(stdres.engmark,max1));

gotoxy(47,13);
printf("100");
gotoxy(32,13);
scanf("%d",stdres.matmark);
gotoxy(72,13);
printf("%c",grade(stdres.matmark,max1));

gotoxy(47,15);
printf(" 70");
gotoxy(32,15);
scanf("%d",stdres.phymark);
gotoxy(72,15);
printf("%c",grade(stdres.phymark,max2));

gotoxy(47,17);
printf(" 70");
gotoxy(32,17);
scanf("%d",stdres.chemark);
gotoxy(72,17);
printf("%c",grade(stdres.chemark,max2));

gotoxy(47,19);
printf(" 70");
gotoxy(32,19);
scanf("%d",stdres.commark);
gotoxy(72,19);
printf("%c",grade(stdres.commark,max2));

gotoxy(47,25);
printf("410");
gotoxy(31,25);

printf("%d%d%d%d
%d",total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,st
dres.commark));stdres.total=total(stdres.engmark,stdres.matmark,stdres.ph
ymark,stdres.chemark,stdres.commark);

gotoxy(32,27);
stdres.percentage=percent(stdres.total);
printf("%f",stdres.percentage);
gotoxy(80,50);

fwrite(&stdres,sizeof(stdres),1,tfile);
fread(&stdres,sizeof(stdres),1,result);

getch();
}
else
{
fwrite(&stdres,sizeof(stdres),1,tfile);
fread(&stdres,sizeof(stdres),1,result);
}

}
else
{
fwrite(&stdres,sizeof(stdres),1,tfile);

fread(&stdres,sizeof(stdres),1,result);
}

}
fclose(result);
fclose(tfile);

if(flag2==1)
{
result=fopen("result.txt","w");
tfile=fopen("tfile.txt","r");
fread(&stdres,sizeof(stdres),1,tfile);
while(tfile)
{
fwrite(&stdres,sizeof(stdres),1,result);
fread(&stdres,sizeof(stdres),1,tfile);
}
fclose(result);
fclose(tfile);

if(flag==0)
{

clrscr();
gotoxy(23,23);
printf("SORRY! The Roll No.=%d does not exist.",roll);
gotoxy(23,25);
printf(" PLEASE! TRY AGAIN.");
fclose(result);
getch();

menu();
}

void merit1()

{ // FUNCTION TO GENERATE MERIT LIST //


int larg,l,flag=0,i;
int k=3;
FILE *result,*tfile;
clrscr();
gotoxy(15,17);
printf("Press any key for the merit list");
gotoxy(80,50);
getch();
clrscr();
gotoxy(15,17);
printf("PLEASE wait while the list is being generated...");
gotoxy(80,50);
delay(2000);
clrscr();
gotoxy(15,15);
printf("LIST generated.");
gotoxy(15,17);
printf("press any key to continue...");
gotoxy(80,50);
getch();
clrscr();
result=fopen("result.txt","r");
tfile=fopen("tfile.txt","w");

fread(&stdres,sizeof(stdres),1,result);
while(result)
{

l=total(stdres.engmark,stdres.matmark,stdres.phymark,stdres.chemark,stdre
s.commark);
if(l>368)
{
temp.roll=stdres.rollno;
strcpy(temp.name,stdres.name);
temp.clas=stdres.clas;
temp.sec=stdres.s;
temp.total=l;
fwrite(&temp,sizeof(temp),1,tfile);
}
fread(&stdres,sizeof(stdres),1,result);

fclose(result);
fclose(tfile);
gotoxy(12,1);
printf("ROLL NO.");
gotoxy(22,1);
printf("NAME");
gotoxy(38,1);
printf("TOTAL");
for(i=410;i>368;i--)
{

tfile=fopen("tfile.txt","r");
fread(&temp,sizeof(temp),1,tfile);
while(tfile)
{
if(temp.total==i)
{
flag=1;
gotoxy(15,k);
printf("%d",temp.roll);
gotoxy(22,k);
printf("%s",temp.name);
gotoxy(39,k++);
printf("%d",temp.total);
k++;

}
fread(&temp,sizeof(temp),1,tfile);

}
fclose(tfile);
}

if(flag==0)
{
clrscr();
gotoxy(15,20);
printf("SORRY! No record found.");
}
gotoxy(80,50);
getch();
menu();

void merit()
{
// FUNCTION TO GENERATE SECOND MERIT LIST //
int n,c,flag=0;
int k=3,i;
FILE *result;
clrscr();
gotoxy(15,2);
printf("MENU");
gotoxy(15,4);
printf("1. ENGLISH");
gotoxy(15,5);
printf("2. MATHEMATICS");
gotoxy(15,6);
printf("3. PHYSICS");
gotoxy(15,7);
printf("4. CHEMISTRY");
gotoxy(15,8);
printf("5. COMPUTER");
gotoxy(15,18);
printf("Enter your option: ");
printf("%d",&n);
clrscr();
switch(n)
{

/*english*/

case 1: back1:
gotoxy(15,2);
printf("1. Students with Grade 'A'");
gotoxy(15,3);
printf("2. Students with Grade 'B'");
gotoxy(15,4);
printf("3. Students with Grade 'C'");
gotoxy(15,5);
printf("4. Students with Grade 'E' ");
gotoxy(15,7);
printf("Enter your Option: ");
scanf("%d",&c);
clrscr();
gotoxy(14,1);
printf("Roll no.");
gotoxy(25,1);
printf("Name");
gotoxy(37,1);
printf("Class");
gotoxy(45,1);
printf("Section");
gotoxy(60,1);
printf("Marks");
switch(c)
{
case 1: for(i=100;i>74;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.engmark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.engmark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
gotoxy(80,50);

}
if(flag==0)
{
gotoxy(20,22);
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}

getch();

break;

case 2: for(i=74;i>60;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.engmark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.engmark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{

gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);

}
getch();
break;

case 3: for(i=60;i>33;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.engmark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.engmark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
case 4: for( i=33;i>0;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.engmark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.engmark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
default:clrscr();
gotoxy(25,25);
printf("Invalid Option.");
getch();
goto back1;
}

menu();

/*mathematics*/
case 2: back2:
gotoxy(15,2);
printf("1. Students with Grade 'A'");
gotoxy(15,3);
printf("2. Students with Grade 'B'");
gotoxy(15,4);
printf("3. Students with Grade 'C'");
gotoxy(15,5);
printf("4. Students with Grade 'E' ");
gotoxy(15,7);
printf("Enter your Option: ");
scanf("%d",&c);
clrscr();
gotoxy(14,1);
printf("Roll no.");
gotoxy(25,1);
printf("Name");
gotoxy(37,1);
printf("Class");
gotoxy(45,1);
printf("Section");
gotoxy(60,1);
printf("Marks");
switch(c)
{
case 1: for(i=100;i>74;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.matmark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%d",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.matmark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
gotoxy(80,50);

}
if(flag==0)
{
gotoxy(20,22);
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);

getch();

break;

case 2: for(i=74;i>60;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.matmark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("5c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.matmark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{

gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);

}
getch();
break;

case 3: for(i=60;i>33;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.matmark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.matmark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
case 4: for( i=33;i>0;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.matmark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.matmark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);
}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
default:clrscr();
gotoxy(25,25);
printf("Invalid Option.");
getch();
goto back2;
}

menu();

/*physics*/

case 3: back3:
gotoxy(15,2);
printf("1. Students with Grade 'A'");
gotoxy(15,3);
printf("2. Students with Grade 'B'");
gotoxy(15,4);
printf("3. Students with Grade 'C'");
gotoxy(15,5);
printf("4. Students with Grade 'E' ");
gotoxy(15,7);
printf("Enter your Option: ");
scanf("%d",&c);
clrscr();
gotoxy(14,1);
printf("Roll no.");
gotoxy(25,1);
printf("Name");
gotoxy(37,1);
printf("Class");
gotoxy(45,1);
printf("Section");
gotoxy(60,1);
printf("Marks");
switch(c)
{
case 1: for(i=100;i>74;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.phymark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.phymark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
gotoxy(80,50);

}
if(flag==0)
{
gotoxy(20,22);
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);

getch();

break;

case 2: for(i=74;i>60;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.phymark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.phymark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);

if(flag==0)
{

gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);

}
getch();
break;

case 3: for(i=60;i>33;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.phymark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.phymark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
case 4: for( i=33;i>0;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.phymark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%s",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.phymark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
default:clrscr();
gotoxy(25,25);
printf("Invalid Option.");
getch();
goto back3;
}

menu();

/*chemistry*/
case 4: back4:
gotoxy(15,2);
printf("1. Students with Grade 'A'");
gotoxy(15,3);
printf("2. Students with Grade 'B'");
gotoxy(15,4);
printf("3. Students with Grade 'C'");
gotoxy(15,5);
printf("4. Students with Grade 'E' ");
gotoxy(15,7);
printf("Enter your Option: ");
scanf("%d",&c);
clrscr();
gotoxy(14,1);
printf("Roll no.");
gotoxy(25,1);
printf("Name");
gotoxy(37,1);
printf("Class");
gotoxy(45,1);
printf("Section");
gotoxy(60,1);
printf("Marks");
switch(c)
{
case 1: for(i=100;i>74;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.chemark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.chemark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
gotoxy(80,50);

}
if(flag==0)
{
gotoxy(20,22);
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);

getch();

break;

case 2: for(i=74;i>60;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.chemark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.chemark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{

gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);

}
getch();
break;

case 3: for(i=60;i>33;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.chemark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.chemark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);
}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
case 4: for( i=33;i>0;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.chemark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.chemark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
default:clrscr();
gotoxy(25,25);
printf("Invalid Option.");
getch();
goto back4;
}

menu();

/*computer*/

case 5: back5:
gotoxy(15,2);
printf("1. Students with Grade 'A'");
gotoxy(15,3);
printf("2. Students with Grade 'B'");
gotoxy(15,4);
printf("3. Students with Grade 'C'");
gotoxy(15,5);
printf("4. Students with Grade 'E' ");
gotoxy(15,7);
printf("Enter your Option: ");
scanf("%d",&c);
clrscr();
gotoxy(14,1);
printf("Roll no.");
gotoxy(25,1);
printf("Name");
gotoxy(37,1);
printf("Class");
gotoxy(45,1);
printf("Section");
gotoxy(60,1);
printf("Marks");
switch(c)
{
case 1: for(i=100;i>74;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.commark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.commark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
gotoxy(80,50);

}
if(flag==0)
{
gotoxy(20,22);
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);

getch();

break;

case 2: for(i=74;i>60;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.commark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.commark);
k++;
}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);

if(flag==0)
{

gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);

}
getch();
break;

case 3: for(i=60;i>33;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.commark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.commark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
case 4: for( i=33;i>0;i--)
{

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.commark==i)
{
flag=1;
gotoxy (17,k);
printf("%d",stdres.rollno);
gotoxy(25,k);
printf("%d",stdres.name);
gotoxy(39,k);
printf("%d",stdres.clas);
gotoxy(47,k);
printf("%c",stdres.s);
gotoxy(62,k++);
printf("%d",stdres.commark);
k++;

}
fread(&stdres,sizeof(stdres),1,result);

}
fclose(result);
}
gotoxy(80,50);
if(flag==0)
{
gotoxy(20,22);
printf("NO RECORD FOUND.");
gotoxy(80,50);
}
getch();
break;
default:clrscr();
gotoxy(25,25);
printf("Invalid Option.");
getch();
goto back5;
}
menu();

default: clrscr();
printf("INVALID OPTION");
getch();
menu();

gotoxy(80,50);

void delet()

{ // FUNCTION TO DELETE A RESULT ENTRY //


// student stud;
int r,s,flag=0;
char t,z;
FILE *result,*tfile;
clrscr();
printf("Enter the class: ");
scanf("%d",&s);
printf("Enter the section: ");
scanf("%c",&t);
printf("Enter the roll no.");
scanf("%d",&r);

result=fopen("result.txt","r");
tfile=fopen("tfile.txt","w");
fread(&stdres,sizeof(stdres),1,result);
while(result)
{
if(stdres.clas==s&&stdres.s==t&&stdres.rollno==r)
{
clrscr();
flag=1;
gotoxy(20,20);
printf("RECORD FOUND AND DELETED.");
getch();
}
else
fwrite(&stdres,sizeof(stdres),1,tfile);
fread(&stdres,sizeof(stdres),1,result);
}
fclose(result);
fclose(tfile);

if(flag==0)
{
clrscr();
gotoxy(25,22);
printf("RECORD NOT FOUND.");
getch();
exit(0);
}

result=fopen("result.txt","w");
tfile=fopen("tfile.txt","r");
fread(&stdres,sizeof(stdres),1,tfile);
while(tfile)
{
fwrite(&stdres,sizeof(stdres),1,result);
fread(&stdres,sizeof(stdres),1,tfile);
}
fclose(result);
fclose(tfile);

/*DISPLAYING THE RECORDS AFTER DELETION*/

clrscr();
printf("New File after Deletion of Record");
getch();

result=fopen("result.txt","r");
fread(&stdres,sizeof(stdres),1,result);

while(result)
{

int max1=100,max2=70;
char ch;
clrscr();
printf("CLASS:");
gotoxy (16,1);
printf("SECTION:");
gotoxy(31,1);
printf("ROLL NO:");
gotoxy(47,1);
printf("STUDENT'S NAME:");
gotoxy(1,5);
printf("FATHER NAME:");
gotoxy(45,5);
printf("CLASS TEACHER:");
gotoxy(1,9);
printf("S.NO.");
gotoxy(15,9);
printf("SUBJECT");
gotoxy(30,9);
printf("MARKS");
gotoxy(40,9);
printf("MAXIMUM MARKS");
gotoxy(70,9);
printf("GRADE");
gotoxy(3,11);
printf("1");
gotoxy(15,11);
printf("ENGLISH");
gotoxy(3,13);
printf("2");
gotoxy(15,13);
printf("MATHS");
gotoxy(3,15);
printf("3");
gotoxy(15,15);
printf("PHYSICS");
gotoxy(3,17);
printf("4");
gotoxy(15,17);
printf("CHEMISTRY");
gotoxy(3,19);
printf("5");
gotoxy(15,19);
printf("COMPUTER");
gotoxy(3,25);
printf("6");
gotoxy(15,25);
printf("TOTAL");
gotoxy(3,27);
printf("7");
gotoxy(15,27);
printf("PERCENTAGE");
gotoxy(8,1);
printf("%d",stdres.clas); /*printing student information*/
gotoxy(25,1);
printf("%c",stdres.s);
gotoxy(40,1);
printf("%d",stdres.rollno);
gotoxy(63,1);
puts(stdres.name);
fflush(stdout);
gotoxy(14,5);
puts(stdres.fatername);
fflush(stdout);
gotoxy(60,5);
puts(stdres.teachname);

gotoxy(47,11); /*marks table*/


printf("100");
gotoxy(32,11);
printf("%d",stdres.engmark);
gotoxy(72,11);
printf("%c",grade(stdres.engmark,max1));

gotoxy(47,13);
printf("100");
gotoxy(32,13);
printf("%d",stdres.matmark);
gotoxy(72,13);
printf("%c",grade(stdres.matmark,max1));

gotoxy(47,15);
printf(" 70");
gotoxy(32,15);
printf("%d",stdres.phymark);
gotoxy(72,15);
printf("%c",grade(stdres.phymark,max2));

gotoxy(47,17);
printf(" 70");
gotoxy(32,17);
printf("%d",stdres.chemark);
gotoxy(72,17);
printf("%c",grade(stdres.chemark,max2));

gotoxy(47,19);
printf(" 70");
gotoxy(32,19);
printf("%d",stdres.commark);
gotoxy(72,19);
printf("%c",grade(stdres.commark,max2));

gotoxy(47,25);
printf("410");
gotoxy(31,25);
printf("%d%d%d%d%d",total(stdres.engmark, stdres.matmark,
stdres.phymark, stdres.chemark,stdres.commark));
stdres.total = total(stdres.engmark,stdres.matmark, stdres.phymark,
stdres.chemark, stdres.commark);

gotoxy(32,27);
stdres.percentage=percent(stdres.total);
printf("%f",stdres.percentage);
gotoxy(80,50);
fread(&stdres,sizeof(stdres),1,result);
getch();

fclose(result);
menu();

TESTING
R E S U LT MANAG E M E N T

CODED BY Rigzin Angmo & Vaibhav sharma

(“AFTER PRESSING ANY KEY”)

MAIN MENU

1. Create the primary result register


2. Add result
3. Modify result
4. Search result
5. Delete result
6. Generate merit list grade wise per subject
7. Generate merit list on the basis of total marks
8. exit
Enter option(1-8):

FUTURE SCOPE OF PROJECT


It will be very good project in the future. Because of:-

1. it is very simple to use.


2. it is user friendly.
3.we can simply keep the detail of marks if student.
4. in register we can not keep detail in proper manner.
5.it is easy to handle
6.it is time saving.
7. we can not modify the result in register.
8.we can simply modify the result at any time.
9. the main future of the project, we can use the project through
internet.

You might also like