strchr() is the generic version of looking in a string-

but note - you wanted the first occurrence of \0 - which
in C is really strlen()

memset is easier to use - however the version spaces I gave you is specific version of how memset is implemented in gcc.

FYI -

strstr() is the C version of instr, it will work with single chars as well.

















The examples I gave you are all pointer based. If you don't understand 'em Kedaman suggested memset(), which is just fine.