3 ms·
The opposite is more dangerous. If you include the explicit cast and for some reason malloc was not declared (you forgot an include for example) then the implic
by jjnoakes 5y ago
The opposite is more dangerous. If you include the explicit cast and for some reason malloc was not declared (you forgot an include for example) then the implicit int return type that the compiler assumed will cause UB at runtime after you convert the result of malloc to a pointer of a different size.