Given
struct node
{
int a;
struct node * next;
};
To malloc a new structure,
struct node *p = malloc(sizeof(*p));
Because if at some later point in time p is made to point to another structure type then your memory allocation statement using malloc doesn't have to change, it still allocates enough memory required for the new type. It ensures:
In general it is always a good practice to not rely on concrete types and the the first form just does that ,it doesn't hard code a type.