double **dptr;

dptr = new double*[5];
for (int i = 0; i < 5; i++)
dptr[i] = new double[3];

How many rows and columns will there be in dptr? Also, what would the code look like to Delete all the space allocated for dptr???

1 answer

dptr = new double*[5];
// creates 5 rows

for (int i = 0; i < 5; i++)
dptr[i] = new double[3];
// creates 5 columns for each row.

// use the free() function to release memory
Similar Questions
    1. answers icon 1 answer
  1. btnCalculate.addActionListener(new ActionListener)() {public void actionPerformed(ActionEvent e) { double recitation =
    1. answers icon 0 answers
  2. In which sentence is the word “double” used as an adjective?(1 Point) That number is expected to double over the next
    1. answers icon 1 answer
  3. Determine the exact output to the following code segment:int sum1 = 10+5; double sum2 = 10+5.0; int quotient1 = 15/4; double
    1. answers icon 1 answer
more similar questions