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

What action did the United States take that the Queen believes is an injustice?
Write two sentences that explain what this evidence tells you about Manjiro’s culture.
WILL GIVE BRAINLIEST!! The Browns plan to fly to their vacation spot and then drive through the mountains. They arranged to rent a sedan for $37.45 per day wit
please help and dont say it randomly. only answer if u actually know not just to be funny ​
Define the word "cause" 20 points a problem or event that brings change. people working. no change occurs. all of the above
SOMEBODY HELP ME PLEASE
What was the overall strategy of America and its allies in World War II?
If you have a group of 14 boys and 13 girls, and you want to choose 3 from each group, how many ways can this be done?
Calculate the number of moles in 40g of Al(OH)3
In humans, the allele for brown eyes, B, is dominant over the allele for blue eyes, b. Which combination of alleles shown below could result in a person with bl