Hi gaurav i have written another method for printing the date check it.

u can implement this program in c also.First read whole article and understand logic behind the program and try to implement ur own logic for that.