Answer Posted / prakruthi
new automatically calls the constructor while malloc()
dosen't., also new being an operator, it can be overloaded.
since malloc returns a void pointer it is necessary to
explicitly typecast it into an appropriate type of pointer.
This gets completely avoided when we are using new operator.
| Is This Answer Correct ? | 25 Yes | 2 No |
Post New Answer View All Answers
What is the difference between abstraction and polymorphism?
what is difference between class template and template class?
What is the difference between encapsulation and polymorphism?
What is the point of polymorphism?
How oops is better than procedural?
What is encapsulation c#?
i am getting an of the type can not convert int to int *. to overcome this problem what we should do?
What are two types of polymorphism?
What is oops in simple words?
What language is oop?
What is inheritance and how many types of inheritance?
What do you mean by variable?
Why is polymorphism important in oop?
What is the important feature of inheritance?
Is this job good for future? can do this job post grduate student?