Student database
From Programming In C
Exercise 6.2
The Students Database File link points to a data file which contains a (unspecified) number of student records. Save this file on your U: drive via:
- Open the link, copy and paste this data into a Word or Notepad document called student in the same directory as your source code. Save the file as ”Text only”, so that it will be called students.txt.
This text file represents a simple student database of student records with each row corresponding to a different (ficticious) student. The first and second columns correspond to the student's 5-digit student number and surname. The third column is the student's sex (M/F) and the final 3 columns are the student's date of birth in the form date (dd), month (mm) and year (yyyy) where dd, mm and yyyy are all integers.
Write a program that opens the file students.txt and for each student writes out the student's number and age on 1st November 2011. Write all male students to a file called M.txt and write all female students to a file called F.txt.
Note: the output must be formatted so that the student number is left-aligned and that the age is 2 digits and all ages are aligned in the same columns, for example:
12345 15 23456 17 34567 20
