Question

2. For each of the following parts, write a single C++ statement that performs the indicatedtask. For each part, assume that all previous statements have been executed (e.g., whendoing part

e, assume the statements you wrote for parts a through d have been executed). a. Declare a pointer variable named cat that can point to a variable of type double. b. Declare mouse to be a 5-element array of doubles. c. Make the cat variable point to the last element of mouse. d. Make the double pointed to by equal to 25, using the * operator.cat e. Without using the cat pointer, and without using square brackets, set the fourth element (i.e., the one at position 3) of the mouse array to have the value 54. f. Move the cat pointer back by three doubles. g. Using square brackets, but without using the name mouse, set the third element (i.e., the one at position 2) of the mouse array to have the value 42. h. Without using the * operator or the name mouse, but using square brackets, set the double pointed to by cat to have the value 27. i. Using the operator in the initialization expression, declare a bool variable named band initialize it to true if the double pointed to by cat is equal to the double immediately following the double pointed to by cat, and false otherwise. Do not use the name mouse. j. Using the ==named d and initialize it to true if cat points to the double at the start of the mouse array,operator in the initialization expression, declare a bool variable and false otherwise.

Question image 1Question image 2Question image 3Question image 4Question image 5Question image 6Question image 7Question image 8Question image 9Question image 10Question image 11