a) Declare the variable longPtr to be a pointer to an object of type long. b) Assign the address of variable value1 to p

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

a) Declare the variable longPtr to be a pointer to an object of type long. b) Assign the address of variable value1 to p

Post by answerhappygod »

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++
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply