Master
asked

Expert
Abhay Jajodia answered
Great question — and yes, in C, the order definitely matters when you're working with pointers.
Let’s break it down:
&numbermeans “the address ofnumber”ptis a pointer that’s supposed to store that address
So when you write:
pt = &number; // ✅ Correct
You’re saying: “Assign the address of number to the pointer pt.”
But writing:
&number = pt; // ❌ Invalid
doesn’t make sense to the compiler. You’re trying to assign a value to an address, which isn’t allowed. In C, you can store an address in a pointer, but you can’t overwrite a memory address like that.
So always think of it this way:
A pointer holds the address — it doesn’t assign to it.
If you have more questions, I am here to help.
C
This question was asked as part of the Learn C Programming course.
Our Experts
Sudip BhandariHead of Growth/Marketing
Apekchhya ShresthaSenior Product Manager
Kelish RaiTechnical Content Writer
Abhilekh GautamSystem Engineer
Palistha SinghTechnical Content Writer
Sarthak BaralSenior Content Editor
Saujanya Poudel
Abhay Jajodia
Nisha SharmaTechnical Content Writer
Udayan ShakyaTechnical Content Writer