# Computers

posted by .

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???

• Computers -

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. ### Chemistry

What are the major organic products of this reaction: CH3CH2CH2COCH2CH3 (an O is double bonded to the C before the O) + H2O --> (acid is above the arrow) DrBob222- There are 2 oxygens. I said there is an O double bonded to the C. …
2. ### Algebra

Need to get these checked-- 33. What is the area of a square with the dimension of 1 + sqrt of 2?
3. ### computer

construct function prototypes for descriptions given below: 1) Rarb() takes no arguments and has no return value. 2) Mains() takes a float argument and returns an int. 3) San() takes two double arguments and returns a double. 4) Sum() …
4. ### C++

You are to use an array of doubles to compute the average of a sequence of numbers and the standard deviation of the numbers. Based on these value you will print for each of the values in the array: the array index, the value, the …
5. ### Computer Science Computer Programming

Please help! I cannot figure out what I am doing wrong. I cannot get the correct output when I run the system. Here is what I have entered in to Netbeans IDE: package shippingcharges; public class ShippingCharges { private double weight; …
6. ### Java Programming

I need to create a pseudocode for the follwing application: Write Java-like pseudocode to specify the logic for the following program application: Write an application that prompts an employee for an hourly pay rate and hours worked. …
7. ### computer science

Writing a c++ program that stores the following values in five different variables:28,32,37,24,and 33.We have been ask to get the average of the series of values given above. Here I what I got /// This program calculates the sum and …
8. ### Computer Science Principles

I need to know what's wrong with my code and it's supposed to be in the Next-Line blocking style. import java.util.Scanner; public class AreaOfCircle{public static void main(String[] args) { double PI = 3.14159;double get_this; double …
9. ### Visual Basic

how to use formula b=p (1+r)^n, to calculate annual interests for a savings account in visual basic project This is my code so far>>>>>>>>>>>>>> Option Explicit On Option Strict On Option Infer …
10. ### Biology

16. During DNA replication, all of the following steps occur EXCEPT a. enzymes proofread new strands for errors and correct them b. the double helix is unwound by DNA polymerases c. base-pairing rules determine which nucleotide is …

More Similar Questions