Consider the following code:
typedef struct list_ele
{
char *value;
struct list_ele *next;
}list_ele_t;
typedef struct
{
list_ele_t *head;
int qSize;
}queue_t;
And If I use a function to malloc a pointer of queue_t like this
queue_t *q = malloc(sizeof(queue_t));
What it actually happen? I mean, how big the memory it will create by malloc, should I use the following code
q->head = malloc(sizeof(list_ele_t));
to apply for space for q->head?
I'm not good at C language (;w;) , I try my best to think but I got nothing.