Hi all,
I was wondering how do we write if say; p is points to i.
Is it like this: *p = i;
Thanks.
Pointer
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Jan 24, 2012, 1:15 PM EST
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 banie68 reputationPosted Jan 24, 2012, 3:27 PM EST