1 Replies - 321 Views - Last Post: 16 May 2019 - 01:41 PM Rate Topic: -----

#1 Rextor1337   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 16-May 19

Need help with sorting inside files in c

Posted 16 May 2019 - 01:19 PM

Hi guys please i need help with homework.

1. Add Student Record
2. Delete Student Record
3. Update Student Record (The search key is Student Number)
4. View all Student Records
5. Sort Records by Student Number
6. Sort Recorsd by Student Name
7. Sort Records by Math Grade
8. Sort Records by Science Grade
9. Sort Records by Turkish Grade
10. Write sorted records to “sorted.bin” file.
11. Exit

this is functions which i must do i made first 4 statements but i have no idea to how sort data inside files please could you give some advice how i can write my code?


This is my struct:


struct Student
{
int SN; //Student number
int d,m,y; //birth date
char N[25]; //name
char S[25]; //surname
float MG; //math grade
float SG; //science grade
float TG; //turkish grade
};

Is This A Good Question/Topic? 0
  • +

Replies To: Need help with sorting inside files in c

#2 modi123_1   User is offline

  • Suitor #2
  • member icon



Reputation: 15114
  • View blog
  • Posts: 60,481
  • Joined: 12-June 08

Re: Need help with sorting inside files in c

Posted 16 May 2019 - 01:41 PM

What have you tried, thought about, or considered?
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1