An attempt at learning C...