Big difference here between these two, check out a copy of "Deep C Secrets" by Peter van der Linden.
This is ok, safe, complete, reliable:
memset( s, '\0', sizeof( s) );
This yields the perception that it works, depending on what is going to make use of s later on, it could fail to do what you intended depending on how you use s:
This is ok, safe, complete, reliable:
memset( s, '\0', sizeof( s) );
This yields the perception that it works, depending on what is going to make use of s later on, it could fail to do what you intended depending on how you use s:
s[ 0 ] = '\0';