Source: http://www.cs.cmu.edu/~ab/15-123N09/lectures/Lecture%2002%20-%20%20C%20Strings%20File%20IO%20C%20primer.pdf