If I declare a pointer to a struct in .h for example:
my_struct_t *ptr;
... and then I check if(ptr==NULL)
in the code, without actually setting ptr to NULL or allocating memory for it, can I do that check to see if its equal to NULL?
essentially what I'm asking is, by having ptr in the .h, does it get set to NULL automatically, or do I have to do that?
Thanks, Hristo
revisiont: this is done in C