Questions about Linked Lists?

Casting the return value of malloc

Re: Casting the return value of malloc

by Siba Haidar -
Number of replies: 0
Malloc returns a void pointer (void *)
In order to access the pointer
Foe example to put value in the pointer or if the pointer is a complex type, to put values in its fields,
You need to cast so that the compiler knows how to deal with the memory space pointed to by the pointer