Hi everyone! I need your help to understand the situation below. Please be good to me..

For example I have the given structure:

Code:
struct orders
{
int quantity; char foodname [50];
} typedef struct orders ORDER; struct Table {
int tableno; int priority; ORDER *orders;
struct Table *next;
} typedef struct Table TABLE
Now I am required to implement a create function using singly linked list with a dummy node. I actually have several answers and I am not sure which one is correct.

1st answer:
Code:
TABLE *create()
{
TABLE *newO;
newO = (TABLE *)malloc(sizeof(TABLE)); newO->next = NULL; return newO;
}
2nd answer:
Code:
TABLE *create()
{
TABLE *newO; newO = (TABLE *)malloc(sizeof(TABLE)); newO->tableno = NULL; newO->priority = NULL; strcpy(newO->orders.foodname, " "); newO->orders.quantity = NULL; newO->next = NULL; return newO;
}
As you can see on my 2nd answer, i have set all the elements on the structure as NULL;

3rd answer:
Code:
TABLE *create()
{
TABLE *newO; newO = (TABLE *)malloc(sizeof(TABLE)); if (newO) {
newO->next = NULL; return newO;
} else {
return O;
}
}
On my 3rd answer, I have an if statement to check if the pointer is null.

4th answer:
Code:
TABLE *create()
{
TABLE *newO; newO = (TABLE *)malloc(sizeof(TABLE)); if (newO)
{
newO->tableno = NULL;
newO->priority = NULL; strcpy(newO->orders.foodname, " "); newO->orders.quantity = NULL;
newO->next = NULL; return newO;
} else {
return 0;
}
}
Just same with 3rd answer but with the elements of the data structure set to NULL.

Can you please tell me which one is the correct answer?
Or are my answer all acceptable?

Also if there is wrong with my answers, can you pinpoint which part is it?

Looking forward to hear from everyone really soon.