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
- 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 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
- Now write a function which will print the list of students with CGPA more than 3.5
- 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
Get step-by-step solutions from verified subject matter experts
