Because the dates are stored as character arrays, not strings. A string ends in with '\0'. You have space for the date only: 01/01/2012 = 10 characters.
Define your dates as 11 or more characters make sure you load a '\0' in the 11th position.
Also, see this about using gets() and scanf()
WaltP
Posting Sage w/ dash of thyme
10,506 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944
I would also use printf format string properly (for example "%30s") instead of gotoxy.
pyTony
pyMod
5,359 posts since Apr 2010
Reputation Points: 782
Solved Threads: 852