Hector9810 Hector9810
  • 04-10-2019
  • Computers and Technology
contestada

)Dynamically allocate an object of Banana, using the pointer variable daco.

a)Banana * = new daco;

b)daco = new * Banana;

c)daco = new & Banana;

d)daco = new Banana;

Respuesta :

ExieFansler ExieFansler
  • 04-10-2019

Answer:

d) daco = new Banana;

Explanation:

Dynamically allocated variables have their memory allocated in the heap memory.We declare a dynamical variable like this:-

int *a=new int ;

It means a pointer a is created on the stack memory which hold the address of the block that hold the value of variable a in heap memory.

We already have the pointer daco. We just have to initialize with keyword new.

It will be like daco=new Banana; which matches the option d.

Answer Link
taylorlattimore21
taylorlattimore21 taylorlattimore21
  • 05-11-2020

Answer:

What can I help you with:)

Explanation:

Answer Link

Otras preguntas

Helen Grey By Christina Georgina Rossetti Because one loves you, Helen Grey, Is that a reason you should pout, And like a March wind veer about, And frown, and
What does the random variable (r) for a binomial experiment of n trials represent?
Helen Grey By Christina Georgina Rossetti Because one loves you, Helen Grey, Is that a reason you should pout, And like a March wind veer about, And frown, and
If a store credit account charges 1.5% interest each month, what is the APR?
Helen Grey By Christina Georgina Rossetti Because one loves you, Helen Grey, Is that a reason you should pout, And like a March wind veer about, And frown, and
why do we use a coeficient to remove the propotionality
Why are capillaries thin walled?
let f(x)=x^2 - 16. find f^-1(x).
3x+4y=17 solve for y.
Is velocity related to momentum