Question: i need flow chart for this code. #include #include #include struct student { int rollno; char name[20]; int phy_m,chem_m,math_m,eng_m,cs_m; float per; char grade; int std;
i need flow chart for this code.
#include
#include
#include
struct student
{
int rollno;
char name[20];
int phy_m,chem_m,math_m,eng_m,cs_m;
float per;
char grade;
int std;
};
FILE *fptr;
void display()
{
struct student st;
int n;
int flag=0;
printf("---------------------------------------------------------------------------------");
printf(" -------------------------------------------------------------------------------");
printf(" Student Report ");
printf(" -------------------------------------------------------------------------------");
printf(" ------------------------------------------------------------------------------- ");
fptr=fopen("students.txt","r");
while(fread(&st,sizeof(struct student),1,fptr))
{
if(st.rollno==n)
{
printf(" Roll number of student : %d",st.rollno);
printf(" Name of student : %s",st.name);
printf(" Marks in Physics : %d",st.phy_m);
printf(" Marks in Chemistry : %d",st.chem_m);
printf(" Marks in Maths : %d",st.math_m);
printf(" Marks in English : %d",st.eng_m);
printf(" Marks in Computer Science : %d",st.cs_m);
printf(" Percentage : %.1f",st.per);
printf(" Grade : %c",st.grade);
flag=1;
}
}
fclose(fptr);
if(flag==0){
how to fix strange characters on .txt file?
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
