Many teachers search the Internet for plagiarism. If they see that their question was asked here, and then you give the student the answer or close to the answer, that student could get in a lot of trouble, possibly fail, and in some cases suspended or expelled.
If the poster never asked for you to give code, then don't do it -- even if they demand an answer, don't give them one (except for belligerent posters, where there is a house trick that I've done a few times).
It may not hurt you, and it may not hurt GCDEF or any of us, but it sure could hurt that unfortunate student who never asked you to post lengthy answers for him/her. There have been posters pleading that certain "helpers" remove their answers from this board because of the fear of being accused of plagiarism.
I posted pseudo code….. Get real! We are not here to police the school system….. If a kid trys to trick code from us here then he/she deserves everything they get!