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

Have both a significant hydrophilic region and a significant hydrophobic region.
according to lincolns ten percent plan what could happen when te percent of a states voters took a loyalty oath to the union
Complete the sentence with the correct indirect object pronoun (me, te, le, etc.) and the correct form of the verb gustar. ¿Qué __________ __________ hacer (to
If radio station call letters must begin with either k or w and must include either two or three additional​ letters, how many different possibilities are​ ther
A soccer team plays 104 tournaments in 2 years.......
Who was a First Lady lobbied for educational opportunities for women
The distance between A (-5, 3) and B(5, 3) is. 3 6 10
what are two ways that early judaism differed from other religions of the time
I need help ASAP!!!!!!
What are the terms in the question 18xy+3x+7