The integer literal 000101
is interpreted as an octal representation of the decimal 65
, because of the leader zero.
A literal is a number written out in your source code. This does not include characters in a file, or characters inputted by a user into an I/O stream.
Any integer literal beginning 0
is an octal integer literal.
To stick to decimal literals, do not use leading zeroes.
students[0].date = 101;
students[1].date = 951230;
students[2].date = 570509;
students[3].date = 120915;
students[4].date = 20324;
As discussed above, this is kind of a strange way to do human-readable dates (typically you'd use a string for this, and leave the integer storage to some internal representation such as a UNIX timestamp).