Why is it safer to use sizeof(*pointer) in malloc

https://stackoverflow.com/a/17258659 It is safer becuse you don’t have to mention the type name twice and don’t have to build the proper spelling for “dereferenced” version of the type. For example, you don’t have to “count the stars” in Compare that to the type-based sizeof in where you have too make sure you used the right number of * under sizeof. […]