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

Dеclarе and allocatе mеmory (on thе hеap) for a two-dimеnsional array of strings namеd carMakеs with 20 rows, еach with 6 columns

Respuesta :

ExieFansler ExieFansler
  • 23-09-2019

Answer:

string ** carMakes=new string*[20];  

   for(int i=0;i<20;i++)

   {

       carMakes[i]=new string[6];

   }

Explanation:

The above written piece of code is in C++ and it will declare and allocate memory on the heap for a 2-D array of strings with the number of rows 20 and number of columns 6 with name of the array carMakes.

To declare a 2-D array in C++ we use new keyword.

Answer Link

Otras preguntas

which is the balanced equation for s8 o2 → so2?
a number raised to a negative exponent is negative. always never sometimes
who was the last czar of russia? nicolas i alexander ii alexander iii nicolas ii
Pease, can you give me the question # B. Thanks
what should you pay attention to when you see a title for the first time?
where is macbeth going when he sees the bloody dagger?
Can anyone help me out plz
the following sequence is an arithmetic sequence: 1, 4, 7, 10, ... true or false
the price of a technology stock has dropped to $9.65 today. yesterday's price was $9.72 . find the percentage decrease. round your answer to the nearest tenth o
what is the first step in solving the quadratic equation x2 = 9/16 ? take the square root of both sides of the equation. add 9/16 to both sides of the equation.