Could someone please help me with this? Why is yearofstart value not printed out in the first argument ? I knw there is something wrong, but I don't knw what is it :)
Thanks so much.
#include <stdio.h>
struct date{
int year;
}yearofstart={1950};
struct record{
char *name;
char acct_type;
struct date yearofstart;
}customer={"Jones",'A'};
void adjust(struct record *ptr);
int main(){
printf("%s %c %d \n",customer.name,customer.acct_type,customer.yearofstart.year);
adjust(&customer);
printf("%s %c %d \n",customer.name,customer.acct_type,customer.yearofstart.year);
return 0;
}
void adjust(struct record *ptr){
ptr->name="Mike";
ptr->acct_type='B';
ptr->yearofstart.year=1999;
}