First, I just wanted to thank everyone who replies to all these threads for the sole purpose of helping someone to learn. I think its great that people like you are around helping others. I'm a begining C programmer and have never participated in a thread, but have been reading other people's threads for a while in order to learn, and am always impressed by the good advice and care that is posted on this site. Thank you all.

Now for a quick question ;-)

I am trying to use the memset command to fill up a structure with #'s, but it doesn't seem to be working. Each part of the structure is only 16 bytes, but the memset seems to only fill up four characters.

Anyway, here is the structure defined and the way I've been using memset:

typedef struct phoneTemplate
{
char lastName[16];
char firstName[16];
char phoneNumber[16];
}phoneRec;

...program here...
then the initialization and use of the memset line.

jones = (phoneRec *)malloc(sizeof(phoneRec));
if (jones==NULL)
{ perror("struct1"); exit(1); }

memset(jones,'#',sizeof(jones));

Thanks in advance for any help.

Joe