Getting the data at an address

If you have an address, you can get the data stored there using the * operator. Have the log display the value of the integer stored at addressofI.

i​n​t​ ​m​a​i​n​(​i​n​t​ ​a​r​g​c​,​ ​c​o​n​s​t​ ​c​h​a​r​ ​*​ ​a​r​g​v​[​]​)​
{​
 ​ ​ ​ ​i​n​t​ ​i​ ​=​ ​1​7​;​
 ​ ​ ​ ​i​n​t​ ​*​a​d​d​r​e​s​s​O​f​I​ ​=​ ​&​i​;​
 ​ ​ ​ ​p​r​i​n​t​f​(​"​i​ ​s​t​o​r​e​s​ ​i​t​s​ ​v​a​l​u​e​ ​a​t​ ​%​p​\​n​"​,​ ​a​d​d​r​e​s​s​O​f​I​)​;​
 ​ ​ ​ ​p​r​i​n​t​f​(​"​t​h​i​s​ ​f​u​n​c​t​i​o​n​ ​s​t​a​r​t​s​ ​a​t​ ​%​p​\​n​"​,​ ​m​a​i​n​)​;​
 ​ ​ ​ ​p​r​i​n​t​f​(​"​t​h​e​ ​i​n​t​ ​s​t​o​r​e​d​ ​a​t​ ​a​d​d​r​e​s​s​O​f​I​ ​i​s​ ​%​d​\​n​"​,​ ​*​a​d​d​r​e​s​s​O​f​I​)​;​
 ​ ​ ​ ​r​e​t​u​r​n​ ​0​;​
}​

Notice that the asterisk is used two ...

Get Objective-C Programming: The Big Nerd Ranch Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.