Stupendous
[H]ard|Gawd
- Joined
- Aug 29, 2000
- Messages
- 1,370
I can't remember if C would zero and NULL this memory for me. See the code excerpt for details and question
Code:
typedef struct list_type
{
node_ptr head;
node_ptr tail;
uint size;
} list, *list_ptr;
int main(void)
{
list l;
// will l.head and l.tail == NULL and will l.size always be 0?
// or do I need to do the following
l.head = NULL;
l.tail = NULL;
l.size = 0;
}