hi i am a new student of c++ from virtual university of pakistan.i have just started
learning c++.so guide me through this program thankyou.i have only 4hours left. for submission of assignment
Create a program that shows the simple manipulation of the pointers. Yours program should contain the following steps:
a) declare a pointer on variable x
b) set a value to pointer on x
c) declare a pointer on pointer on x
d) set a value to pointer on pointer on x
After you complete the program, show it graphically that how each value is stored in the memory and which variable points to which location. Use the following table to show each value and its location.
Memory
Value location
Yours program should have an output in this form:
Sample Output
Value of x: 5
Location address of x: 0x22ff7c
Value of pointer on x: 0x22ff7c
Location address of pointer on x: 0x22ff78
Value of pointer on pointer on x: 0x22ff78
Location of pointer on pointer on x: 0x22ff74
learning c++.so guide me through this program thankyou.i have only 4hours left. for submission of assignment
Create a program that shows the simple manipulation of the pointers. Yours program should contain the following steps:
a) declare a pointer on variable x
b) set a value to pointer on x
c) declare a pointer on pointer on x
d) set a value to pointer on pointer on x
After you complete the program, show it graphically that how each value is stored in the memory and which variable points to which location. Use the following table to show each value and its location.
Memory
Value location
Yours program should have an output in this form:
Sample Output
Value of x: 5
Location address of x: 0x22ff7c
Value of pointer on x: 0x22ff7c
Location address of pointer on x: 0x22ff78
Value of pointer on pointer on x: 0x22ff78
Location of pointer on pointer on x: 0x22ff74