Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

the difference between new and malloc

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


Please Help Members By Posting Answers For Below Questions

What is the difference between abstraction and polymorphism?

1103


what is difference between class template and template class?

2661


What is the difference between encapsulation and polymorphism?

1112


What is the point of polymorphism?

1035


How oops is better than procedural?

1102


What is encapsulation c#?

1082


i am getting an of the type can not convert int to int *. to overcome this problem what we should do?

2320


What are two types of polymorphism?

1078


What is oops in simple words?

1101


What language is oop?

1013


What is inheritance and how many types of inheritance?

1105


What do you mean by variable?

1041


Why is polymorphism important in oop?

1086


What is the important feature of inheritance?

1143


Is this job good for future? can do this job post grduate student?

2166