| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|||||||
| ds. c , c++ Interview / Technical Questions Kindly solve an many as questions you can. It will sharpen your skills and those solutions will help others too. |
![]() |
|
|
LinkBack | Thread Tools | Rate Thread | Display Modes |
|
|
#2 (permalink) |
|
Junior Member
Join Date: Oct 2007
Age: 21
Posts: 4
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2
|
Re: C language - What is a pointer value and address?
* represents the value in the address and address is ..........address of the variable
|
|
|
|
|
|
#3 (permalink) |
|
Senior Member
Join Date: Oct 2006
Location: Mayiladurai (TN)
Posts: 233
Thanks: 8 Thanked 7 Times in 5 Posts Thanks: 8
Thanked 7 Times in 5 Posts
Rep Power: 5
|
Re: C language - What is a pointer value and address?
pointer value is the value stored in a pointer i.e an address of a variable
Address - itself gives the memory location which contain an value of any type |
|
|
|
|
|
#4 (permalink) |
|
Junior Member
Join Date: Sep 2007
Age: 25
Posts: 16
Thanks: 1 Thanked 0 Times in 0 Posts Thanks: 1
Thanked 0 Times in 0 Posts
Rep Power: 2
|
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 |
|
|
|
|
|
#5 (permalink) |
|
Junior Member
Join Date: Apr 2007
Posts: 6
Thanks: 0 Thanked 0 Times in 0 Posts Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2
|
Re: C language - What is a pointer value and address?
pointer is a variable that hold the address of other variable.
it should be declared as data type *pt_name eg int *p;//declare pointer p p=&a;//address of variable a v=*p;//v have tha value at address p |
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|