The working of the new keyword is similar to malloc and both of the keywords can be used with C++. In the modern days, new operator is majorly used for allocating the memory as it possesses some advantages over malloc method. Malloc was the old method so it was used before the introduction of new operator.
Read More