Yes, right what you have said. I have tried both ways to solve that( initialize the pointer and change a pointer for a simple structure). It functions perfectly. My fault. Thanks guys. Shanatos.