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

Which of the following can be added to the number indicated on the number line above to sum to 0? A. -7/8 B. 7/8 C. 8/7 D. -8/7
AP US History question: Discuss the impact of territorial expansion on national unity between 1800 and 1850.
what is the greatest perimeter of 6 square centimeters
A pitcher is full of lemonade. Which unit of liquid volume best describes the amount of lemonade in the pitcher? Explain.
95% of 160 I need help with this question
What is the combined weigh of 6 3/8 kilograms and 7 2/5
What is denaturation? A. A structural change of a protein that results in the loss of its biological properties B. A change in the genetic code of an organism C
what happened to the colonists who opposed the Declaration of Independence
who created the Ursuline order
what is thirty percent of two hundred ?