News for hackers. Stuff that matters.
Re:Interviewing programmers: coding test example explained by cperciva on Thursday June 03, 2010 @03:34PM (#1402266)
It doesn't check for bad pointers

C is a foot-shooting language. Its basic library functions are expected to do what you tell them to do, even when it's a really bad idea. Checking for bad pointers (and how exactly you define "bad" is a rather interesting question) is clearly out of scope.

has no comments

True, but I'm not convinced there's much point on such a trivial piece of code.

doesn't take memory corruption into consideration

Given that there is no redundant information available, this is an impossible challenge.

and assumes the replacement character is not '\0'.

Try re-reading the code a bit more closely.

There are no comments on this comment yet.