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

Alicia estimates that the surface area of a rectangular prism with a length of 11 meters,a width of 5.6 meters,and a height of 7.2 meters is about 334 cubic met
After what happened on April 19 can war between the colonies and Great Britain be avoided?
Dominick lives 1 3/4 miles from his school.  If his mother drives him half the way, how far will Dominick have to walk to get to school?
5x+4y+100 in slope intercept form
An airplane travels 3,260 kilometers in 4 hours. What is the airplane’s average speed?
Determine whether the sequence coverage or diverges. If it converges, give the limit. 48, 8, 4/3, 2/9, ...
“The genetic code is universal.” Explain this statement.
How do scientists use seismic waves to determine the interior structure of Earth?
By the mid-1700s, the largest city in the colonies was (A) New York (B) Boston (C) Philadelphia (D) Charleston (E) Wilmington, Delaware
If 8 men can chop down 28 trees in one day, how many trees can 20 men chop down in one day?