It's just too easy to re-invent a particular bit of "IP". I mean, I've done some of those on-line "C Programming Interview Test Questions", and come up with something identical to the given answer, except for choice of variable names.
Independent invention just ruins "IP" as property.