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 do frogs do on land and in water?
#1 simplify. (this is square roots) 36/121 Answers: A. 18/11 B. 18/10 C. 6/121 D. 6/11 #2 simplify 162 A. 81 and 2 B. 9 and 18  C. 9 and 6 D. 9 and 2 #3 Between
On a map, 1/4 inch represents 12 miles. If a road is 66 miles long, what is its length, in inches, on the map?
What is the expanded form of 7,330,968
what year did mid slavery started
Why is Chillingworth called a "leech"? In the scarlet letter by Nathaniel Hawthorne
Which of the following is not a perfect square trinomial?1)144 + 12y + y^22)100 + 20y + y^23)64 − 16y + y^24)25 + 10y + y^2i need help with this one, please...
in the boy in striped pjs, what do we learn about Pavel in Chapter 7
What is the solution to the proportion?  8/4=11/M Answers: A. M=3 B. M=5.5 C. M=7 D. M=22
Which of the following best explains the origin of the predation ability of Venus flytraps? A. Only those plants with the ability to supplement the poor nutrien