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
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