Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started