Why do we cast return value of malloc? [duplicate]
No need to cast return value of malloc as its return type is void*. Can someone explain why do some programmers use (char *) in front of the malloc? They are doing wrong (most probably) by casting it (in good programmers opinion). As wiki says: malloc returns a void pointer (void *), which indicates that … Read more