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
Why do we use class in oops?
What is static modifier?
Question: Write a program that prints a paycheck. Ask the program user for the name of the employee, the hourly rate, and the number of hours worked. If the number of hours exceeds 40, the employee is paid “time and a half”, that is, 150 percent of the hourly rate on the hours exceeding 40. Be sure to use stepwi se refine ment and break your solution into several functions. Use the int_name function to print the dollar amount of the check.
officer say me - i am offered to a smoking , then what can you say
What is destructor oops?
What is polymorphism oop?
What is polymorphism give a real life example?
What is pointer in oop?
Whats oop mean?
What is polymorphism programming?
Can a destructor be called directly?
What is the oops and benefits of oops programming?
What is polymorphism what are the different types of polymorphism?
Why multiple inheritance is not possible?
What exactly is polymorphism?