kristalynhayes2490 kristalynhayes2490
  • 14-09-2019
  • Computers and Technology
contestada

Dеclarе and allocatе mеmory (on thе hеap) for a onе-dimеnsional array of 256 doublеs namеd pricеs

Respuesta :

ExieFansler ExieFansler
  • 20-09-2019

Answer:

double *prices=new double [256];

Explanation:

To allocate memory on heap we use new keyword.In the above statement an array name prices is declared and the memory allocated to it is on the heap memory.

First look at double * prices.It is a pointer this pointer is created on the stack memory which holds starting address of the array present on the heap memory of size 256..

Answer Link

Otras preguntas

Solve the quadratic equation by completing the square. x^2−4x-10=0 First, choose the appropriate form and fill in the blanks with the correct numbers. Then, sol
Merchants were drawn to the the Middle Colonies because of their religious tolerance and cultural diversity. True or false?
what is the non permissible replacement for y in 3/-5y
Imagine your 16-year-old daughter wants to attend a friday night high school party, and you do not know who will be attending. using three parenting styles disc
What is the volume of the carton?
11. How did the mujahideen respond when the Soviets occupied Afghanistan?
The figure below shows the quotient of fraction 2 over 3 ÷ fraction 4 over 9 using a rectangle model.
Factor the following.
In open areas and around vessel swim platforms, certain activities should be avoided. what activity should be avoided in order to keep away from carbon monoxide
Which cell structures cause the outer surface of the rough endoplasmic reticulum to appear rough?