a) Declare the variable longPtr to be a pointer to an object of type long. b) Assign the address of variable value1 to p
Posted: Fri May 20, 2022 12:31 pm
a) Declare the variable longPtr to be
a pointer to an object of type long.
b) Assign the address of variable
value1 to pointer variable longPtr.
c) Display the value of the object
pointed to by longPtr.
d) Assign the value of the object
pointed to by longPtr to variable value2.
e) Display the value of value2.
f) Display the address of value1.
g) Display the address stored in
longPtr. Is the address displayed the same as value1’s?
c++
a pointer to an object of type long.
b) Assign the address of variable
value1 to pointer variable longPtr.
c) Display the value of the object
pointed to by longPtr.
d) Assign the value of the object
pointed to by longPtr to variable value2.
e) Display the value of value2.
f) Display the address of value1.
g) Display the address stored in
longPtr. Is the address displayed the same as value1’s?
c++