Leer una fecha, pedir un numero de dias que se suma a esa fecha, mostrar la fecha final
#include <stdio.h> #include <time.h> void print_time(struct tm *tmp) { printf("%d/%d/%d %d:%d:%d\n", tmp->tm_year + 1900, tmp->tm_mon + 1, tmp->tm_mday, tmp->tm_hour, tmp->tm_min, tmp->tm_sec); } int main(void) { time_t t; struct tm *tmp; struct tm *tmp1; char buf1[64]; char buf2[64]; t = time(NULL); tmp = localtime(&t); if (tmp == NULL) { perror("localtime"); return 1; } print_time(tmp); if (strftime(buf1, sizeof(buf1), "H:M:S", tmp) == 0) { fprintf(stderr, "buffer length %zu