All I basically want to do is have a memory address (for example 0x22FF74), & be able to use that to display the value stored in it.
I know how to do like:
1 2
int x=1;
printf("0x%X",&x);
Using the & reference operator to get the actual address, I just don't know how to take the address & find the value from that.
Any help at all is much appreciated.
Something that could be like:
Enter your memory address: 0x22FF74
The value in 0x22FF74 is: (value)
Thanks.
Maybe I should have been more specific (I thought I was).
I know how to do it with variables that have been declared in the actual code, what I want to do is being able to access ANY variable using it's hexadecimal (or decimal) reference. For example using the address 0x22FF74 to find it's value, so as opposed to using *(&x) you would use like *(&0x2FF74) (that does not actually work however).