code_with_pointers.cpp
:
Running this produces something like
Enter divisor: 93 After dividing by 93, some number is 1.07527e+28 Address of some_number: 80987ffcd4 ... and its pointer: 80987ffcd4 Value pointer's value: 80987ffccc What value pointer points *at*, before multiplying: 7 7 times 8 = 56Note you will often get a different address on each run because putting data at the different addresses increases security.
code_with_pointers.s
:
compling the .cpp with the -S -O
options