Skip to content
Snippets Groups Projects
Select Git revision
  • d48edcd327479e7a230e1a34684f251a5cd47337
  • master default protected
  • 2018ws
  • 2017ws
  • 2016ws
5 results

incdate-1.c

Blame
  • Forked from Peter Gerwinski / hp
    46 commits behind the upstream repository.
    incdate-1.c 358 B
    #include <stdio.h>
    
    typedef struct
    {
      char day, month;
      int year;
    }
    date;
    
    void set_date (date *d)
    {
      d->day = 31;
      d->month = 1;
      d->year = 2012;
    }
    
    void inc_date (date *d)
    {
      d->day++;  /* FIXME */
    }
    
    int main (void)
    {
      date today;
      set_date (&today);
      inc_date (&today);
      printf ("%d.%d.%d\n", today.day, today.month, today.year);
      return 0;
    }