Cache memory program in c