Question: 1) Declare a double pointer. Allocate new memory for it and assign it a value of 36.7. Remember, you are assigning a value to the

1) Declare a double pointer. Allocate new memory for it and assign it a value of 36.7. Remember, you are assigning a value to the memory location, don't assign 36.7 as the address!

2) Complete the following program as instructed in the comments

int kidsAge=11, *papaAge, *familyAges[2];

//a) dynamically allocate an int and assign the location to papaAge

papaAge= __________________________________________;

//b) Assign 35 to papaAge (the value 35, NOT the memory location 35!)

___________________ = 35; //c) Assign element 0 of familyAges to papaAge

____________________________ = papaAge; //d) Assign element 1 of familyAges to address of kidsAge

__________________________________________________;

//e) Write code to efficiently add 5 to every element of familyAges (that is, the value of kidsAge should be 16, and papaAge 40.

_____________________________________________

_____________________________________________

_____________________________________________

_____________________________________________

3) Make a proper function call using only the variables defined below as arguments. Note that you may need to modify the variables with the operators used in processing pointers, but you must use one of the 3 variables listed below. Also note that you should not try to guess at the implementation of the functions, all you are doing is calling the function properly. int i=6;

double *doub = new double;

char* exclaim="I've got game!";

a) void yourGame(char );

b) void myScore(double *, int);

c) void myGoodness(char *);

d) void earlyTime(int);

e) void lateTime(int*, char*, double, double* );

f) void e(double);

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!