flowchart of student database management system in c
#1
Heart 

it is very beautiful because it was made up of by almighty












be with me
Reply
#2

#include<stdio.h>

int bubble(int*,int);
void filewrite();
void avgmarks();
void fileprint();
void filesort();
void rollin();

/*********************** SORTING FUNCTION ***************************/
int bubble(int x[],int n)
{
int hold,j,pass,i,switched = 1;
for(pass = 0; pass < n-1 && switched == 1;pass++)
{
switched=0;
for (j=0;j<n-pass-1;j++)
if (x[j]>x[j+1])
{
switched=1;
hold = x[j];
x[j] = x[j+1];
x[j+1]=hold;
}
}
return(0);
}
/*********************** FILE WRITING FUNCTION ******************************/
void filewrite()
{
int roll,ch,mark;
char nam[50];
FILE *fp;
clrscr();
fp = fopen("student.txt","a");
printf("ENTER ROLL NUMBER, NAME , MARKS \n");
ch =1;
while(ch)
{
scanf("%d%s%d",&roll,&nam,&mark);
fprintf(fp,"%d %s %d\n",roll,nam,mark);
printf("\n\n press 1 to continue,0 to stop");
scanf("%d",&ch);
}
fclose(fp) ;
}
/******************** OUTPUTING DATA ON SCREEN***************/
void fileprint()
{
int marks[100],rollno[100],x[100],i;
char name[100][50];
FILE *fp;

clrscr();
fp = fopen("student.txt","r");
i=0;
printf("ROLLNO NAME MARK\n");
while(!feof(fp))
{
fscanf(fp,"%d %s %d\n",&rollno[i],&name[i],&marks[i]);
printf(" %d %s %d\n",rollno[i],name[i],marks[i]);
i=i+1;
}
fclose(fp);
printf("\n\n\nPRESS ANY KEY");
getch();

}
/******************* SORTING FILE ************************/
void filesort()
{ int marks[100],rollno[100],x[100],n,i,j;
char name[100][50];
FILE *fp,*fm;

fp = fopen("student.txt","r");
fm = fopen("marks.txt","w");
i=0;
while(! feof(fp))
{

fscanf(fp,"%d %s %d\n",&rollno[i],&name[i],&marks[i]);
x[i]= marks[i];
i=i+1;
}

n=i;

bubble(x,n);

for(i=0;i<n;i++)
{
printf(" %d\t",x[i]);
}

for(i=0;i<n;i++)
{
for (j=0;j<n;j++)
{
if(x[i]==marks[j])
{
fprintf(fm,"%d %s %d\n",rollno[j],name[j],marks[j]);
}
}
}
fclose(fm);
fclose(fp);
printf("\n\n\nPRESS ANY KEY");
getch();

}
/************************* DATA USING ROLLNO***************************/
void rollin()
{ int i,roll,ch,mark,roll1;
char nam[50];
FILE *fm;

ch=1;
while(ch)
{ clrscr();
fm = fopen("marks.txt","r");
printf(" \n ENTER ROLL NUMBER - ");
scanf("%d",&roll1);
i=0;
while(! feof(fm))
{
fscanf(fm,"%d %s %d\n",&roll,&nam,&mark);
if(roll1==roll)
{printf("\nROLLNO. NAME MARKS\n ");
printf(" %d %s %d\n",roll,nam,mark);
break;
}
else
i=i+1;
}
printf("\n\npress 1 to see student info, 0 to return to main menu\n");
scanf("%d",&ch);
fclose(fm);
}



}

void avgmarks()
{
int marks[100],rollno[100],n,i;
float avg,x;
char name[100][50];
FILE *fm;
fm = fopen("marks.txt","r");
i=0;
while(! feof(fm))
{

fscanf(fm,"%d %s %d\n",&rollno[i],&name[i],&marks[i]);
x = x + marks[i];
i=i+1;
}
n = i;
avg = x/n;
printf("AVERAGE MARKS OF %d STUDENTS ARE - %f ",n,avg);
fclose(fm);
printf("\n\n\nPRESS ANY KEY");
getch();

}


/**************** FUNC. ENDS************************/
void main()
{
int marks[100],rollno[100],x[100],n,i,j,roll,c,mark,roll1;
char name[100][10],nam[50];

while(c!=6)
{
clrscr();
printf("GIVE CHOICE--\n");
printf(" 1 TO ENTER STUDENT INFO.\n");
printf(" 2 TO SEE STUDENT.TXT FILE\n");
printf(" 3 TO SORT FILE ON BASIS OF MARKS\n");
printf(" 4 TO PRINT STUDENT INFO. USING ROLL NO\n");
printf(" 5 TO FIND AVERAGE OF MARKS\n");
printf(" 6 TO EXIT\n\n--");
scanf("%d",&c);
clrscr();
switch©
{
case 1:
filewrite();
break;
case 2:
fileprint();
break;
case 3:
filesort();
break;
case 4: rollin();
break;
case 5: avgmarks();
break;
case 6:
break;
default:
break;
}
}

}
Reply

Important Note..!

If you are not satisfied with above reply ,..Please

ASK HERE

So that we will collect data for you and will made reply to the request....OR try below "QUICK REPLY" box to add a reply to this page
Popular Searches: simple flowchart of student information system, student database management system project report pdf, flowchart for lic database management, alumni student database management system, student management system flowchart in c, student database management, automotive inventory vehicle management system flowchart,

[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Possibly Related Threads...
Thread Author Replies Views Last Post
  student database management with attendance and internal marks 3 1,390 18-09-2017, 11:43 AM
Last Post: jaseela123d
Thumbs Up online catering management system on php with report and source code and ppt 4 9,000 29-04-2017, 10:59 AM
Last Post: jaseela123d
  source code for student final year online clearance system 3 1,191 24-02-2017, 04:11 PM
Last Post: jaseela123d
  srs for complaint management system in android 2 903 01-10-2016, 11:25 PM
Last Post: Guest
  pscad student version full version download 2 1,619 15-09-2016, 05:05 PM
Last Post: swathy murukan
  source code for student final year online clearance system 2 741 30-08-2016, 10:20 PM
Last Post: Youngprof
  limitation of employee management system 2 953 19-08-2016, 11:59 AM
Last Post: seminar report asees
  literature survey on sports management system 3 1,133 10-08-2016, 11:53 AM
Last Post: jaseela123d
Photo prison management system with visual basic code 2 957 04-08-2016, 09:36 AM
Last Post: seminar report asees
  student fees management system pdf download 2 1,093 30-07-2016, 12:27 AM
Last Post: Guest

Forum Jump: