//  Program to illustrate structure pointers

#include <stdio.h>

int main (void)
{
     struct date
     {
          int  month;
          int  day;
          int  year;
     };
     /*Remember when struct date today is declared the 
       memory is set aside.*/
     struct date  today, *datePtr;

     /*This means dataPtr, which is a pointer is set equal
       to the address of today.  So now datePtr is pointing to 
       the memory address of today*/
     datePtr = &today;

     /*Now datePtr can reference the members of the date structure*/
     datePtr->month = 9;
     datePtr->day = 25;
     datePtr->year = 2015;

     printf ("Today's date is %i/%i/%.2i.\n",
               datePtr->month, datePtr->day, datePtr->year % 100);

     return 0;
}
