struct node{
int w;
int x;
}
struct node *item;
- Please explain the difference between these statements.
i read as typecasting after malloc is not needed. why is that so?
1)
item = malloc(sizeof(*item));2)
item = malloc(sizeof(struct node));3)
item = (struct node *) malloc(sizeof(struct node));
Aucun commentaire:
Enregistrer un commentaire