Question: a) Declare an integer pointer. b) Use the integer pointer to allocate a dynamic array of 30 integers. c) Given the following: double *dp, *dq;

 a) Declare an integer pointer. b) Use the integer pointer to

a) Declare an integer pointer. b) Use the integer pointer to allocate a dynamic array of 30 integers. c) Given the following: double *dp, *dq; double x = 78.9; double y = 23.4; dp = &x; dq = &y; i. What is the value of *dp? ii. Write the C++ code that will swap the values of x and y, WITHOUT USING x and y in your code. iii. Given the following code, write an expression that uses b to copy the third element of the array to the fourth element. DO NOT use a in your answer. float a[5] = {0.0, 1.1, 2.2, 3.3, 4.4}; float *b = &a [1]

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!