By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,301 Members | 1,434 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,301 IT Pros & Developers. It's quick & easy.

help

P: 6
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

--------------------------------------------------------------------------------
Nov 2 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.