No, the OP will per definition NOT learn if he is provided with an answer. Maybe he will understand the answer, but he failed the necessary step of practising the process of thinking of his own answer. Even if he removes the example and re-writes it, it will be with the provided answer in the back of his mind. The global solution is likely to remain the same.
And in the next practice he will get, he will have less stuff to practice before, making it harder for him to proceed.
You couldn't possibly BE more wrong. Of course humans learn by example!

Consider yourself - were you shown LOTS of examples of proper programming, while you were learning C? Of course you were! Whether you learned by examples on a chalk board, in a book, or on the net, it makes no difference - WE LEARN BY EXAMPLES. (That's why good examples in our lives, are so important.)

We also learn by doing, and practice is important. Your comments here are simply so far away from the obvious truth you can see in the world around us, it's amazing.

The unvarnished fact here, is that you know almost nothing about the OP.