C Programming - Pointers - Discussion
Discussion Forum : Pointers - General Questions (Q.No. 8)
8.
The operator used to get value at address stored in a pointer variable is
Discussion:
33 comments Page 2 of 4.
Luso said:
1 decade ago
The pointer symbol * means value at address and it retrieves the data stored at that address whether it would be address of some other location or some other values.
Apurva Nigam said:
1 decade ago
@Govardhana Kj :
U r correct but output should be 100(address of x), coz u r printing y not *y . :) :)
printf("value at Y is %d\n",y);
U r correct but output should be 100(address of x), coz u r printing y not *y . :) :)
printf("value at Y is %d\n",y);
Manmeet said:
1 decade ago
If we want to fetch the address of a variable we use & and on the other hand if we want to fetch the value from the address we use *.
(2)
NRV said:
1 decade ago
& is used to specify the address... eg &a specifies the address...
* and -> can be used to get the values of the pointer....
* and -> can be used to get the values of the pointer....
Ramprasad said:
1 decade ago
No. Actually
y gives address of x
*y gives data of x
&y gives the address of y. The memory which contains the address of x.
y gives address of x
*y gives data of x
&y gives the address of y. The memory which contains the address of x.
Yamuna said:
1 decade ago
By using * (pointer) symbol only we can found the answer.
Also pointer main work is to store the address of another variable.
Also pointer main work is to store the address of another variable.
Dinesh said:
2 decades ago
A.Because you can get value stored at any address only through *.& is used to retrieve the address value.!
Durgesh jaiswal said:
1 decade ago
A. Yeah * is a symbol of pointer and we already know that pointer stores the address of the another variable.
Sandeep Samudrala said:
1 decade ago
To represent the pointers we can use the operator "*". Which access the address of particular datatype.
Amruta said:
1 decade ago
It is also called as 'Indirection operator' and it is used to get the value stored at pointer add.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers