C Programming

rajib's Avatar
Newbie Member
I have a pointer to array declaration - char *properties[100] = {""};

I declared this as GLOBAL and accessed this from a function. When I print the values before elaving the function, it works fine. When I try to print the same after the function call in main(), still its fine..but after sometime (I didn't use this variable in between), it seems to take junk automatically.....

Can somebody pl suggest what to do to fix this?

Thanks for help.

Regards -
Rajib Roy.
DaWei's Avatar, Join Date: Dec 2006
Team Leader
The declaration is very suspicious. What you are declaring is an array that will hold 100 pointers to char. Was that your intention? Explain what you are trying to do with your program and show some code that uses the declared array. Please remain aware that YOU know what your code is supposed to do -- we don't. Always strive to provide meaningful information. My gypsy fortuneteller is on vacation.