If You Want Something To Do, Try This Exercise...
Define a human struct that has 3 fields:
char name[50];
char gender[10];
int age;
Try and use typedef in your program for your struct.
Write a program that reads in a text file containing names, ages and gender of cartoon characters, which are separated using tabs and each character separated using a new line. For example:
Homer J Simpson 39 Male
Marge Simpson 38 Female
Bart Simpson 10 Male
Lisa Simpson 8 Female
Maggie Simpson 1 Female
You can probably tell, but tab characters separate each field above!
Read the file a line at a time. Store each person in an array of human structs (you'll need to allocate memory for the array dynamically since you don't know how many characters are defined in the text file).
Then print out all the original data, stating their name, age and gender.
Then do the same again but state their ages in 3 years time.
I know the Simpsons is a bad example as they've been on our screens for over 10 years and don't seemed to have aged at all! By the way, does anyone know how old is Marge??!!