Hi Please post your complete code. I had a similar problem a few months ago (I'm a C student also) and found that I was initializing my pointers in the wrong place.
I don't know if that is the problem here, but I did learn one thing: it's important to post
your entire code. :-)