3 ms·
malloc() returns a void*, that's enough of a hint that the result can be assigned to any other pointer type without requiring a cast. Nowadays even C compilers
by flohofwoe 5y ago
malloc() returns a void*, that's enough of a hint that the result can be assigned to any other pointer type without requiring a cast.
Nowadays even C compilers warn when trying to assign "incompatible" pointer types.