|
Re: C language - What is a pointer value and address?
basic thing is like other variable (....like int a here a is integer type variable which can hold an integer value.. when we define int a.. compiler allocates a memory 2 or 4 bytes and name it as a..when we assign value it places that value in that memory)
pointer is also a variable.the same thing the compiler does for pointer also..but the difference pointer and a normal variable is the pointer holds the address of other variable of its type..when we ask what is the value of a then its the value we have assigned to it..same thing when we ask what is the value of pointer then its the value we have assigned to it, but here the value is the address of other variable of its type..coming to address like other variable has some memory address..so since pointer is also a variable it also takes some address from memory
|