I have been given a date, Which I am taking as an input like (day, month, year): 12, 03, 87.
Now I need to find out the date after n days.<
the easiest trick is to use time_t type and corresponding functions.
mktime will convert tm structure to time_t. which is an integer value counting the seconds starting 01-Jan-1970.
After you have a time_t value just add the seconds count you need (86400 per day).
To convert back, use gmtime or localtime