Originally Posted by shabbir
Its always a good practice though.
NO, It's not a good practise at all.
You don't need to cast result of malloc in C. Sometimes people do it to maintain compatibility between C and C++ code but then again there are very less situations when you will use malloc in C++.