memset: need & operator for strings?
Posted on 2006-06-05
If I am using memset() to set a string to nulls
(in particular a string within a structure)
/* etc */
I always forget if I need the address (&) operator.
In other words,
which of the following to statements is preferred:
memset(person.last_name, 0, sizeof(person.last_name));
memset(&person.last_name, 0, sizeof(person.last_name));
My gut feeling is that it does not matter for a string
but would appreciate any feedback.