Short note about “Indirection operator (*)”

No comments



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

No comments :

Post a Comment

Subscribe

Milan Panda
Admin
About Me | Contact
Copyright 2023-2024 © Programming1011 . 🎀 Developed and Design By- Milan Panda. Happy Holi All Of You 🎀