Question: write code in c program. And solve a) and b) exactly. * typedef struct { char name[50]; int id; char dept[20]; double cgpa; } student;

write code in c program. And solve a) and b) exactly. * typedef struct {

char name[50];

int id;

char dept[20]; double cgpa;

} student;

  1. Write a function void saveByDept(char *fileName, char *deptName , student allStudents[], int size) that will save the information of all students who belong to the department with name pointed to by deptName into a text file. The name of the file is given as an input parameter, filename.

  1. Write another function to delete the students of the department with a CGPA greater than or equal to 3 from the file you have created in part (a).

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!