To whatever riposte you might be planning, I would point out that I'm not talking about theory, either. Yeah, sure, everyone deserves care and love and ponies. I'm talking about, in practice, would you still be so caring and loving and pony-dispensing after hundreds of these things? If so, you're better than most. (Too much better for me to believe in, in fact.)
The answer wasn't rude, it was just unhelpful.
For those not familiar with the culture on comp.lang.c and the various related C and C++ groups, it is very simple: people will generally be helpful in dealing with homework questions as long as the asker has made a genuine effort.
On the other hand, anyone who just reposts homework verbatim with no effort whatsoever to solve the problem first is likely to find themselves given a very clever answer that is technically correct but clearly completely implausible for a beginner, thus making it very obvious to the teacher that the person is cheating on their homework. I recall a similar example where someone asked how to work out factorials in C++, and was presented with a highly efficient answer... because it used template metaprogramming and generated that answer at compile time.
This was certainly clear in the related FAQs last time I checked, so anyone who asks a homework question without making any effort to solve it themselves is not only lazy but also incapable of following basic netiquette. I doubt you'd find many regular posters on those groups who had much sympathy, even though some of those same posters give up a great deal of time to help those who are making a genuine effort to improve.
Being deliberately unhelpful is rude.
I remember being that kid. Well, not quite so bad that I literally wanted someone to write code for me, but I'm sure someone thought my poorly worded questions were asking people to write code for me. How many kids are we scaring away because we're being assholes to them?