Answer:
see explaination
Step-by-step explanation:
void allocate(double *q,int size)
{
if(size<=0)
q = new double; //Allocates a single double
else
q = new double[size]; //Allocates an array of doubles
}
This function allocates new space for a double array. It alter its pointer argument to point to the newly allocated space.