+ 2
What does the code in description below means?
n=(struct node*)malloc(sizeof(struct node));
2 Answers
+ 8
It means, you request system to allocate some memory (using malloc) the size of the allocated memory is just about the number of bytes it is needed to create a node structure. Then you cast the address of memory block allocated to a pointer of a node structure which you then assign to a variable named n.
Hth, cmiiw
0
It's the same as:
n = new struct node;