# include # include // // Program 18.5, Stephen Kochan, Programming in C. // struct date { int month; int day; int year; }; int main ( void ); struct date foo ( struct date x ); int main ( void ) { struct date today = { 10, 11, 2004 }; int array[5] = { 1, 2, 3, 4, 5 }; struct date *newdate; char *string = "test string"; int i = 3; newdate = ( struct date * ) malloc ( sizeof ( struct date ) ); newdate->month = 11; newdate->day = 15; newdate->year = 2004; today = foo ( today ); free ( newdate ); return 0; } struct date foo ( struct date x ) { struct date value; value = x; value.day = value.day + 1; return value; }