Short note about “Indirection operator (*)”
Indirection operator (*) :-
The symbol * (asterisk) is an indirection operator which is used to access the value of a through a pointer consider the following example –
int m = 15,*mptr;
float x = 2.54,*xptr;
mptr = & m;
xptr = & x;
printf (“Value of m=%d”,*mptr);
printf (“Value of x=0.2f”,*xptr);
When this program is executed, the output will be
Value of m = 15
Value of x = 2.54
Subscribe to:
Post Comments
(
Atom
)
No comments :
Post a Comment