Question: Question 8 Why should I use new instead of malloc() when instantiating an object from a class? Group of answer choices new is an operator

Question 8

Why should I use new instead of malloc() when instantiating an object from a class?

Group of answer choices

new is an operator that can not be overridden.

malloc does not call the classes constructor.

new is easier to spell

It doesn't matter, both are type safe.

Question 9

Which of the following gives the memory address of the integer variable myInt?

Group of answer choices

*myInt;

myInt;

&myInt;

address(myInt);

Question 10

Which of the following gives the memory address of a variable pointed to by pointer myPtr?

Group of answer choices

myPtr;

*myPtr;

&myPtr;

address(myPtr);

Can you help me with this? please?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!