Question: Write code in c program. Create a structure named Students with the following components and appropriate data types: Name, Id, Department, CGPA, Gender. Create an

  1. Write code in c program. Create a structure named Students with the following components and appropriate data types: Name, Id, Department, CGPA, Gender.
    1. Create an Array of Students of size 5 and take the inputs (from console/user to fill the array and write it in a text file called Student.txt
    2. Now write a function which will print the list of students with CGPA more than 3.5
    3. Write a function which will read the student.txt file and create two new text file, one for male students, and another for female students.

Students.txt Khalil Gibran 1621062 ECE 3.60 M Sylvia Plath 1821045 ENV 3.75 F Charles Bukowski 1721082 ENG 3.42 M Allen Ginsberg 1521022 BBA 3.37 M Rabia Balkhi 1731011 ECO 3.95 F

Male_students.txt Khalil Gibran 1621062 ECE 3.57 M Charles Bukowski 1721082 ENG 3.42 M Allen Ginsberg 1521022 BBA 3.57 M

Female_students.txt Sylvia Plath 1821045 ENV 3.75 F Rabia Balkhi 1731011 ECO 3.15 F

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!