i have the following struct code
struct record
{
char Name[21];
char date[3];
};
char array[24];
char *ptr=array;
struct record *read_record;
array[0]=1;
array[1]=2;
read_record = (struct record*) ptr;
printf(" %c %c\n",read_record->Name[0],read_record->Name[1] );
this should display 1 and 2, but display nothing.
can anyone expalin what i'm doing wrong?
thanks
return 0;