Hi all,
I was wondering how do we write if say; p is points to i.
Is it like this: *p = i;
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
VulpesPosted Jan 24, 2012, 6:15 PM
This code may make things clearer:
Initially, 'p' points to 'j' which holds the value 4. However, you then assign 'j' via the pointer the value of 'i' which is 3.
So when you print 'j' you get 3.
siabanie baniePosted Jan 24, 2012, 8:27 PM